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

learn more… | top users | synonyms (1)

4
votes
4answers
841 views

Is it possible to reverse a command in the bash shell?

I was wondering if there is a (simple) possibility to redo/reverse a command that was executed in the bash shell? (to make it undone) Is there something similar to the ctrl+z combination to redo any ...
0
votes
1answer
17 views

ssh-copy-id different port

i am trying execute ssh-copy-id in one port different than 22 (default). I researched and found the command below $ssh-copy-id -i ~/.ssh/id_rsa.pub "user@192.168.0.1 -p 22001" but, when execute the ...
3
votes
3answers
401 views

Why do we have to pass the file name twice in exec functions?

I read Advanced Programming in the UNIX Environment by Stevens, 8th chapter. I read and understand all the six of exec functions. One thing I notice is, in all the exec functions: first argument is ...
5
votes
1answer
413 views

How to write/edit/update the OsIndications efi variable from command line?

In the need to enter the UEFI firmware setup utility while using ultra fast boot (keyboard drivers are not loaded during POST), I wish to write to the "Os Indications" efi variable. My OS is Ubuntu ...
0
votes
1answer
1k views

Kali linux throws ' isolinux.bin missing or corrupt ' error

I downloaded Kali Linux from this link, I have a 32 bit OS, so I guessed ISO 32 Kali Linux is the suitable for me (they did not clarify in the website based on what we choose the type). Then, I ...
91
votes
3answers
22k views

What does “--” (double-dash) mean? (also known as “bare double dash”)

I have seen -- used in the compgen command. For example: compgen -W "foo bar baz" -- b What is the meaning of the --.
0
votes
1answer
14 views

Saving from arecord on a raspberry pi across a network to a mac

I've currently got a usb mic plugged into a Raspberry Pi B+ and am using the following code to record data: arecord --buffer-time=5000000 -D plughw:1,0 -f cd -t raw | lame -r - stream.mp3 I then ...
32
votes
3answers
19k views

How to redirect output of wget as input to unzip?

I have to download a file from this link. The file download is a zip file which I will have to unzip in the current folder. Normally, I would download it first, then run the unzip command. $ wget ...
2
votes
3answers
10k views

ls to show only directory/filename and size

First of all, this is not a duplicate of this: Linux ls to show only filename date and size Because I want to print actual directory name additionally. I was always using this command: ls -l | awk ...
50
votes
8answers
22k views

How can I move files and view the progress (e.g. with a progress bar)?

When moving large directories using mv, is there a way to view the progress (%)? The cp command on gentoo had a -g switch that showed the progress.
5
votes
2answers
109 views

How to type a right to left language in terminal?

Please forgive me if this is a bad question. OK. I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this ...
7
votes
4answers
370 views

How to remove duplicate characters?

If I am having a line as: Thhiisss iisss mmyyy nameeee I want to print this as: This is my name What is the unix command for this?
-4
votes
4answers
180 views

How can I `man print`?

Where can I find more information about the command(?) print since I don't receive a result when I input man print? For example, in the zsh I can do the following: $ print "Hello, world\!" Hello, ...
1
vote
0answers
59 views

What is the meaning of the string **/* when used with grep?

I came across this picture (below), obviously it is a pun or some kind of allusion incorporating command-line expressions. Frankly speaking I do not understand anything of it except for grep -n. ...
-1
votes
0answers
18 views

How can I check which partition scheme is used from the command line ? [duplicate]

I read, there exist two partition schemes: MSDOS Scheme and GPT (GUID partitioning table). I saw how it is made with Gparted, is it possible to show this information just from inside the shell ?
0
votes
1answer
23 views

Why aren't sda3 and sda4 displayed with fdsik -l?

I wanted to display all my partitions, so I entered "fdisk -l". AFAIK, the format of the device file for a scsi hard disk reads like: sd_whichharddisk_whichpartition. To my surprise, after hitting ...
3
votes
2answers
91 views

BASH: Special character '�' suddenly appeared (Ubuntu)

When I erroneously type 'ñ' (expecting to type any command) and then remove it and type the correct letter, the output returns the command with a special character attached �, obviously the shell ...
1
vote
1answer
1k views

How to access u boot environment from linux?

How can I access and change the u-Boot env variables in linux. Using the u-boot/tools/env directory in u boot directory: u-boot$ make env Which created the executable file fw_printenv. I copied ...
1
vote
1answer
25 views

How do I control output after executing a command?

.. Script Run Complete. You have new mail in /var/spool/mail/<user-name> -bash-3.2$ I have seen the above message most the times on my prompt, probably while it's idle or as soon as script ...
1
vote
2answers
93 views

for loop when matching both front and back of file name

I'm trying to set up a for loop to run a process on pairs of files. The names of the files look like this 36_002_CGATGT_L001_R1_005.fastq.gz 36_002_CGATGT_L001_R2_005.fastq.gz ...
0
votes
1answer
36 views

What is the meaning of (^| )ABC( |$) as an extended REGEX ?

I came here across the command grep -E '(^| )ABC( |$)' file1 I am confused how to interpret the regular expression therein, because I know the ^ and $ character as beginning and end signifier, but in ...
101
votes
14answers
43k views

How to have tail -f show colored output

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I ...
1
vote
0answers
14 views

mkvmerge Backward Spliting not supported why?

I tried this:- mkvmerge -o new_file.ogg --split parts:0s-104s,+94s-208s,+8s-12s,+312s-410s,+17s-21s 500.ogg Thrown this error: "The start time must be bigger than or equal to the previous part's ...
32
votes
10answers
19k views

Markdown Viewer

I found a file formatted with Markdown. Could you guys suggest what viewer that I could use to view this type of files? Hopefully one without gui (if it's possible) Update I was actually looking for ...
1
vote
3answers
77 views

What is the meaning of ls -d ?

I entered the man page of ls, the entry for the -d option is as follows: -d, --directory list directory entries instead of contents, and do not derefer‐ ence ...
123
votes
28answers
50k views

Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time ...
0
votes
1answer
20 views

tail-ing a filename that is a date [duplicate]

I am creating a logfile from kermit named the current date (which is in the format of DD MMM YYYY - which can not be changed AFAIK), and using the file name as today's date. I then have a Bash script ...
1
vote
1answer
65 views

Changing themes and hot-corner settings from command-line

I want to change the elementary tweak themes and hot-corner settings on my Elementary Luna (built on Ubuntu 12.04 "Precise") from the commandline. With what command can I do this? I know how to make ...
1
vote
1answer
30 views

Replace case-insensitive string in all folder files

I'm trying to replace a string with another in all files in dir. Trying to use this command sed 's/foo/bar/' * But it replaces foo and not fOo or Foo and others. how to find "foo" ...
0
votes
1answer
26 views

SIPp “hello world” message to Asterisk

How do I run diagnostics against Asterisk? Asterisk is running on tleilax; and doge is on the same network (My network topology isn't optimal). Specifically, I want to do something like: sipp ...
15
votes
4answers
4k views

Why do some commands 'hang' the terminal until they've finished?

Sometimes you run a program from the terminal, say, lxpanel†. The terminal won't drop you back to the prompt, it'll hang. You can press Ctrl+C to get back to the prompt, but that will kill ...
1
vote
1answer
48 views

No such directory after creating it

I'm taking a basic Unix course and right now we're learning terminal. My directions are create a directory called company and subdirectories called sales, accounting and marketing. So I did that. ...
0
votes
2answers
40 views

Why can't I kill the shell using the PID obtained from the $$ special variable? [duplicate]

After I have learned that the $$ special variable holds the process number of the shell, I tried too kill the shell by simply: kill , however this did not work, I also tried some variations, but them ...
-1
votes
0answers
24 views

Delete string from all the files in the folder

I'm seeking for way to delete string from all files in the folder by the regular expression pattern. Need to delete not the whole string but just pattern. Need to delete the strings which looks like: ...
7
votes
7answers
180 views

What is the purpose of having two variables ($@,$*) to transmit the arguments of a command into a script? [duplicate]

I have read of the special variables used in a script $@ and $*. As far as I understand, the arguments used while executing the script are stored into two special variables, once all arguments into $@ ...
-2
votes
0answers
30 views

Remove the string from the all the files in the folder

Need to remove the sought-for string from the all files in folder. Could you give me please the pattern of command? Big THX.
1
vote
1answer
111 views

Linux commands for kids [closed]

My youngest daughter (6) is fascinated with the sl and gti commands. She even learned to combine them with ; and when the time comes to teach her about return values I'll show her how sl && ...
2
votes
1answer
760 views

How do I decrypt a message using openssl's CLI?

I have a message, I know the password and the cipher that was used to encrypt it, but I can't figure out how to ask openssl to decrypt it. I see the cipher in the output from the ciphers command, and ...
10
votes
5answers
775 views

How do I get the size of a directory on the command line?

I tried to obtain the size of a folder (containing folders and sub folders) by using the ls command with option l. It seems to work for files (ls -l file name), but if I try to get the size of a ...
1
vote
1answer
15 views

How to display metainformation for different kinds of time of a file ?

As far as I know each name within a path, e.g. /name1/name2/name3, is allocated to one inode. This inode is a collection of meta information for each name (file or directory). Some of these ...
17
votes
5answers
7k views

What is the difference between ls and l?

I accidentally typed l instead of ls today and found that the command still printed a list of the files in my current directory. Trying l --help brings up the help file for ls suggesting that l is ...
4
votes
3answers
589 views

Why when I ssh into one server it shows bash and the other have my username?

So at work I have two web servers that I am able to ssh into. Both are RHEL 6.5 When I log into one, it shows this: [username@ldvweb01 /]$ When I log into the other one it shows: -bash-4.1$ ...
-1
votes
1answer
41 views

How to install stardict from a tar.gz manually ?

I have downloaded stardict-2.0.0-pre2.tar.gz and applied the extraction on it by writing: tar xzvf stardict-2.0.0-pre2.tar.gz , thereupon a new folder was created with the following content: From ...
1
vote
2answers
66 views

How to list only JPEG files from root below using the command line ?

I am searching for a method to find only JPEG files, With my limited knowledge of Linux I came to this point: 1. list all paths that exist from root below with find / 2. pipe the result into next ...
2
votes
0answers
28 views

How to display entire subject line in `mail`?

There are two messages in /var/mail/test. mail Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/test": 2 messages 2 new >N 1 test@test Tue Feb 17 15:07 18/628 *** SECURITY ...
3
votes
3answers
65 views

how to remove accidentally created '~' and '..'

I'm using wget to download some webpages and I used the -P option without knowing that it wouldn't expend .. or ~. So I found I've created them after running the program. Now the problem is, how do I ...
9
votes
3answers
431 views

How to `locate` multiple files and open them in vim?

Suppose that I have a file named filename123.txt and it is the single file that is named so, and I can locate it with the command locate filename123. And it returns only this file. Now I want to open ...
91
votes
7answers
57k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
14
votes
7answers
5k views

Converting colored output into html

There are tools providing coloured output: dwdiff -c File1 File2 # word level diff grep --color=always # we all know this guy ... The question is: How to convert their colored output of arbitrary ...
4
votes
5answers
1k views

xargs and vi - “Input is not from a terminal”

I have about 10 php.ini files on my system, located all over the place, and I wanted to quickly browse through them. I tried this command: locate php.ini | xargs vi But vi warns me Input is not ...