Linked Questions

28 votes
4 answers
91k views

What does the '|' (vertical bar) character mean in a Terminal command? [duplicate]

Example: In a Terminal command xdpyinfo | grep resolution (that I have taken from an answer), does the | character mean that the xdpyinfo output shall be sent to the grep program input for printing a ...
Tomáš Pečený's user avatar
5 votes
3 answers
634 views

What is | in terminal command [duplicate]

I've been trying to learn how to use apt-get in Ubuntu and I came across this command on a how to geek article sudo dpkg –list | less So this basically lets us look at a list of packages we have ...
Rockstar5645's user avatar
3 votes
1 answer
2k views

tee and output redirection [duplicate]

ls -l *.txt | wc -l | tee count.txt ls -l *.txt | wc -l > tee count.txt I am learning basic Unix commands. I thought those two commands mentioned would do the same thing, but they do not. Only the ...
Mint.K's user avatar
  • 775
-4 votes
1 answer
150 views

Meaning of command1 | command2 is? [duplicate]

Please give the answer for what purpose we use this command only single '|' Please tell me.
ROYAL WARRIOR's user avatar
0 votes
1 answer
54 views

Why can I write to /dev/ttys010 using `>` but not `|` [duplicate]

I am trying to play around and understanding ttys. In one terminal emulator window, the output of tty gives me $ tty /dev/ttys010 So I figured if I write to this device, the terminal window will show ...
michael_fortunato's user avatar
634 votes
2 answers
1.3m views

How to redirect stderr to a file [duplicate]

While using nohup to put a command to run in background some of content appear in terminal. cp: error reading ‘/mnt/tt/file.txt’: Input/output error cp: failed to extend ‘/mnt/tt/file.txt’: Input/...
André M. Faria's user avatar
320 votes
4 answers
250k views

What's the difference between <<, <<< and < < in bash?

What's the difference between <<, <<< and < < in bash?
Searene's user avatar
  • 4,360
197 votes
3 answers
525k views

Command to append line to a text file without opening an editor

Assuming i have a line that i want to add to a file without opening an editor. How could i append this line alias list='ls -cl --group-directories-first' to this file config.fish
NES's user avatar
  • 33.2k
89 votes
4 answers
178k views

What's is the difference between ">" and ">>" in shell command?

Could someone explain to me the difference between > and >> when using shell commands? Example: ps -aux > log ps -aux >> log It seems the result is the same either way.
whale_steward's user avatar
29 votes
6 answers
55k views

How to get dialog box input directed to a variable?

I have been teaching myself bash scripting and have run into an issue. I have written a script to take input from the user, using the 'read' command, and make that input a variable to use later in the ...
emerikanbloke's user avatar
49 votes
4 answers
57k views

What is the differences between &> and 2>&1

There are two forms of redirection the standard output and standard error into standard output. But which one is better? and why the &> is considered the perfect? I can't find what is the ...
Maythux's user avatar
  • 84.3k
38 votes
4 answers
17k views

Why do shells call fork()?

When a process is started from a shell, why does the shell fork itself before executing the process? For example, when the user inputs grep blabla foo, why can't the shell just call exec() on grep ...
bsky's user avatar
  • 1,309
29 votes
2 answers
6k views

Do GUI based application execute shell commands in the background?

I have migrated to Ubuntu 16.04 just 2 days ago from Windows. I like the way we can customise the Unity Desktop. I am just playing around with the look and feel of the Desktop environment. Just like ...
thewebjackal's user avatar
27 votes
1 answer
91k views

What does echo with ">>" symbol do?

I've seen some command like echo '* - nofile 65535' >> /etc/security/limits.conf I know echo print something on the screen. and limits.conf was a file in that /etc/security path. But want ...
Zen's user avatar
  • 683
27 votes
1 answer
14k views

What are directories, if everything on Linux is a file?

Very often beginners hear a phrase "Everything is a file on Linux/Unix". However, what are the directories then? How are they different from files?
Sergiy Kolodyazhnyy's user avatar

15 30 50 per page