Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

The command-line is the interactive interface to your shell.

0
votes
0answers
53 views

how does the command line open and read file from the disk [on hold]

I am doing the exercises from the book Your unix/linux the ultimate guide. I am having difficulty with one of the exercises. here it is briefly describe for each command: i) How the program foo ...
-1
votes
3answers
90 views

How does a program know what to read in a pipeline? [duplicate]

How does the unix command line program know what file to read? For example: cat someFile | foo How does the program foo know which file to read, and which process is responsible for opening and ...
-2
votes
1answer
30 views

Find all the filenames in this directory that do not contain 'a' 'b' or 'c' in their name [duplicate]

I am trying to find all the files in my directory that does not contain the letters a,b or c; why does this command not work? ls *[!abc]* example: eg: MATCH: xyz, dkh, file, foo; NOT MATCH: bar, ...
0
votes
1answer
31 views

mv command is moving to the parent of the provided argument

Let's say I have a working directory: /home/userID/workingDirectory I type a mv command that will affect the parent directory of the current working directory and the working directory itself: mv .*...
0
votes
1answer
25 views

Run combined hexo command from desktop entry

I have Debian 9.5 with xfce and hexo: 3.7.1 The question is about throttle my script called "draft": s@lokal:~$ sudo cat /usr/local/bin/draft #!/bin/bash killall hexo cd /home/s/Dropbox/blog hexo ...
1
vote
1answer
11 views

How to show process tree with specified attributes

The command pstree shows a process tree such as this systemd-+--agetty +--dbus-daemon +--login----bash---pstree +--systemd-qqsd I want to show a process tree with some ...
0
votes
1answer
22 views

The /bin/ prefix to kill command is getting rid of the error message

I have Debian Stretch.. I thought that a regular user could kill root process as root. I was using the command /bin/kill 10733 as the user. There wasn't any error message. Then, I typed out the ...
0
votes
1answer
68 views

Grep exclude result + 3 lines from output [duplicate]

I would like to exclude matching pattern and the following lines from the output files. When I use : cat test1 | grep -Fx -A 3 -f test1ignore The file test1 is here: https://pastebin.com/...
0
votes
0answers
57 views

What does the command line symbols !! and !$ mean? [closed]

I start learning the command line. The roles of the exclamation point and the dollar sign are unknown to me despite a web search. What does the following statements mean? sudo !! sudo cat !$
0
votes
0answers
22 views

Identify Resource Usage of a Process: CPU, Memory and I/O [duplicate]

I need to request some AWS resources and in order to do so, I need to identify what are my requirements for: Number of CPU cores (maybe GPUs as well) (performs parallel processing) Amount of Memory ...
1
vote
2answers
48 views

convert the dates to a standard format

I am using this command, find -name (file name) -ls | awk '{print $11,"\t",$5,"\t",$7,"\t",$8,$10}' to gather information of tons of files. However, some files are giving us weird numbers where ...
1
vote
1answer
23 views

How to produce from the terminal in a single command 2 emacs windows?

I am trying to open 2 separate windows/instances of emacs from the terminal in a single command. I have tried: emacs &; emacs & (error: bash:syntax error near unexpected token ; and emacs &...
11
votes
3answers
1k views

What is the difference between the terms “program”, “command” and “function” in Linux & Unix?

I would like to know whether the commands that we call in the shell are functions or programs?
0
votes
1answer
36 views

How can I kill all child processes of a certain process from the command line?

I run both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the ...
1
vote
2answers
48 views

Making a progress bar in BASH fixed at the bottom of terminal

I have made a pretty basic progress bar in BASH like this :- doned=$1 #amount completed total=$2 #total amount doned=`echo $doned $total | awk '{print ($1/$2)}'` total=`tput cols | awk '{print $1-...
-1
votes
3answers
48 views

Taking a file argument for a Bash script

I'm trying to run a text manipulation script using bash. For the script, I want to take a text file for input using the following syntax ./my_Script.sh < filename Is it possible to take input ...
-1
votes
0answers
21 views

Partitioning sd card with sfdisk

I'm trying to bring up a custom kernel for beaglebone. So my first task is to partition my Sd card and make it bootable using this command.As I understand sfdisk no longer supports -D option. So I ...
1
vote
3answers
68 views

Using ls to find files that end in a character, ignoring extension

I am supposed to use ls to find files that end in a certain letter, but it does not matter if the file has an extension or not. For example, I want it to do this > ls test test.txt test.ascii ...
1
vote
0answers
15 views

Print Jack Audio and MIDI ports to the command line

How do I print jack-audio and midi ports to the command line, similar to aconnect -io for inputs and outputs of ALSA MIDI?
-1
votes
1answer
24 views

Use nohup and return to terminal and pipe to logger

I can redirect output to logger like this: nohup bin/mytask | logger But the process hangs, and my cursor doesn't return to the terminal after the command is sent. (I would have to return to ...
0
votes
0answers
7 views

tool like pnmcut but optimized for static files on disk?

Here's the scenario. I have a ginormous image (~ 30,000 pixels across, so my ginormous might be small to you). I want to take a lot of small cut outs from it. I have code right now that works with ...
0
votes
0answers
14 views

Command line tool to playback audio at variable “turntable speed”

I’m looking for a command-line tool that can play audio from a file at a specified rate and pitch, preserving the rate-pitch ratio. That is, playback with a control analogous to the turntable speed on ...
0
votes
1answer
16 views

Is there an equivalent of DETAIL DISK in Parted or other Linux DISKPART type consoles?

Im trying to scrape information of drive type. EG USB, RAID Etc.. In windows I can use DISKPART and run the command DETAIL DISK : Example: DISKPART> select disk 1 Disk 1 is now the selected disk. ...
0
votes
3answers
55 views

What does “m” mean in mpstat?

I check the manual of mpstat it states: The mpstat command writes to standard output activities for each available processor, processor 0 being the first one. Global average activities ...
0
votes
2answers
35 views

change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss

How do I change date/time format from yyyymmddHHMMss to dd/mm/yyyy HH:MM:ss which is displayed as an output (eg. JOBNAME1 STARTED AT 20180904152402) from a command... grep JOBNAME1 | sed -e s/|/ /...
1
vote
1answer
30 views

cron not executing command with variable

I have some logic for executing java projects; it all works in the terminal console when I type it, but not in the cron scheduler: run 1st microservice and get variable from POST request: java -jar /...
0
votes
1answer
21 views

(BASH) String to execute is formed correctly, but evaluated with errors

I have been persistently trying to solve an issue with some code that I'd like to use to interact with AWS CLI. After trying for about a week, I decided to try to create the string of the command I'd ...
0
votes
0answers
26 views

Having issues with Backbox CTRL+ALT F* command to switch to CLI only

I cant get a screen shot, but what is happening (and this was happening before I switched from Ubuntu to Backbox) is when I press CTRL + ALT + F*, and it switches to the CLI (no GUI, no mouse and such)...
2
votes
1answer
16 views

ss command: difference between raw and unix sockets

The ss command (from the iproute2 set of tools which comes as a newer alternative to netstat) has in its --help the following options -0, --packet display PACKET sockets -t, --tcp ...
0
votes
0answers
21 views

Find files, print creation date and file name [duplicate]

I am trying to find all .odt files created this year, excluding some ending with quote, and output the create date and directory and file name with lines sorted by date. (Create date is important, ...
0
votes
0answers
24 views

Bridging Ports for Switch Hardware

I have a Dell S4128 switch with OpenSwitch OPX as the OS (built on Debian Jessie). To get two devices to talk to each other directly over this switch without IP routing (similar to an unmanaged switch)...
2
votes
1answer
14 views

Metasploitable server

I'm not sure if this would be the right place to ask this question. I've created a sample website using metaexploitable OS, and since this is a terminal-based OS I've been having trouble coding my ...
1
vote
3answers
58 views

tcsh alias with complex cmds, quotes and cmd arguments

I'm tying to alias a set of pipe commands, went thru some of the threads here and found that cmd line should be used differently. instead of $1 use !:1 but it doesn't seem to work for me in the below ...
0
votes
0answers
26 views

Decompress firefox 57+ opened tabs file on Linux from the command line : Error 44 : Unrecognized header : file cannot be decoded

I need to decompress firefox 57+ opened tabs file. I use unlz4 from the Ubuntu package liblz4-tool : $ cp .mozilla/firefox/t6bznle5.default/sessionstore-backups/recovery.jsonlz4 ~/recovery.lz4 $ ...
1
vote
1answer
63 views

Locomotive doesn't work on a debian system: sl ls

PROBLEM: I installed sl but when I type sl on the command line I get this: bash: sl: command not found (root@host)-(03:55:38)-(/home/user) $apt install sl Reading package lists... Done Building ...
-1
votes
2answers
72 views

What part of the terminal stack is responsible for the direction of text being output? [closed]

The question is asked here: https://serverfault.com/questions/152310/reverse-bash-console-text-flow https://superuser.com/questions/719317/can-i-reverse-the-stream-direction-of-my-terminal https://...
0
votes
0answers
19 views

GNOME3: What's the path of gnome run dialog (ALT + F2)?

If I type "touch test" on run dialog it does not create any file on my home folder, so I was wondering where these files are created since I can do some dangerous things like fallocate or dd some ...
0
votes
1answer
29 views

Running OpenGL app without desktop

Is it possible to run an opengl application like glxgears from the command line without starting a desktop environment? It should directly go to exclusive full screen mode.
0
votes
1answer
19 views

How to get Mac OS to remember previous auth. from my executable file

I'm writing a tiny unix executable file that changes my macbook's system time manually. Of course, this requires a password, and so I used the system() function to interface with the terminal and ...
3
votes
1answer
37 views

Replace string in command to be executed in zsh

Say I have written the following command but haven't yet pressed enter to execute it: $ ls dir1 dir2 dir3 Is there a way to replace given characters without manually changing them in every location ...
1
vote
1answer
80 views

Yet another `rm: cannot remove 'file': Permission denied`

I want to remove the .html file from the /home/user1/html/ directory. I have tried nearly all of the solutions posted on a myriad of other web sites. Nothing is working. user1@comp1:~/html$ sudo rm ...
1
vote
2answers
139 views

How to verify a checksum using one command line?

Suppose I type and run the following command: sha256sum ubuntu-18.04.1-desktop-amd64.iso After a delay, this outputs the following: 5748706937539418ee5707bd538c4f5eabae485d17aa49fb13ce2c9b70532433 ...
4
votes
0answers
47 views

Is there a way to set the QT icon theme, and other theme elements, from the command line?

I'm trying to automate the process of theming QT5 programs, in the absence of a DE like KDE, by writing a script that does it. I know that GTK has a bunch of config files that can specify all the ...
7
votes
3answers
2k views

Delete files with names that appear to begin with '?' in command line

I am running under Debian stable, Cinnamon DE and I have some files that I would like to delete with a command line (for now I delete these files with Nemo). For example, these .txt files begin with '...
0
votes
0answers
31 views

Allow user to enter username before mounting shared drive

I have a mount drive which I usually mount using sudo cifs -o "username=myshareddrive_username,uid=$(id -u),gid=$(id -g)" //server-address/folder /mount/path/on/ubuntu Now, I have some linux ...
-1
votes
1answer
61 views

How to clear Chromium Browser cache?

I'm trying to clear my Chromium browser cache using CLI on Gallium OS (based on Xubuntu). What command should I use?
1
vote
1answer
50 views

why $($var) gives an error?

I am trying to execute the following code in shell but I am not getting the output as expected. The command is as follows: i=1 echo $($i) I am getting an error: Command not found error I think it ...
0
votes
1answer
36 views

How to run multiple command in one line and some commands in background at the same time?

I know I can use & at the end of a command to make it run in background and && to connect multiple commands at the same line. However, when I use them together it seems not work. Below is ...
1
vote
2answers
49 views

How can I use 'stat' to detect a new file and then move it to a different directory?

Ultimately I want to detect a new backup file being dropped into a directory and then move that new file to another location for other operations. This needs to work when there is nobody logged into ...
1
vote
2answers
35 views

Awk buffer size

I noticed this interesting set of commands today: $ seq 5 > alfa.txt $ awk '{print 6 > ARGV[1]} 1' alfa.txt 1 2 3 4 5 $ cat alfa.txt 6 6 6 6 6 My first question was why am I getting several 6 ...