I just encountered this command on a linux forum online where the author warned that donot try this command for curiosity. So my curiosity comes. What is the meaning of command “:() { :|:&amp; }; :” in shell?
16337
I was reading Ubuntu Forum's warning about malicious commands and found this interesting gem:  :(){ :|:&amp; };: WARNING: The above code will crash your machine unless you have strict proc limits in place (which you probably don't) prompting a hard restart. Consider this code similar to running sudo rm -rf /.  But what does that mean? Even with my programming experience I've never seen a command that cryptic that's not assembly language.
79418
What does $# mean in shell?  I have code such as  if [ $# -eq 0 ] then   I want to understand what $# means, but Google search is very bad for searching these kinds of things.
64463
So, when a command is not found, by what means is the "did you mean:" list populated? What program finds these alternate commands?  What is the meaning of: "(main), (universe)..."? Can I change which program finds these?
30221
Suppose I want a bash command to do something extra.  As a simple example, imagine I just want it to echo "123" before running.  One simply way to do this would be to alias the command.  Since we still need the original, we can just refer to it by its exact path, which we can find using which.  For example:  $ which rm /bin/rm $ echo "alias rm='echo 123 &amp;&amp; /bin/rm'" &gt;&gt; .bashrc   This was easy because I was able to look up the path to rm using which.  However, I am trying to do this with exit, and which doesn't seem to know anything about it.  $ which exit $ echo $? 1   The command did not output a path, and in fact it returned a non-zero exit code, which which does when a command is not in $PATH.  I thought maybe it's a function, but apparently that's not the case either:  $ typeset -F | grep exit $ echo $? 1   So the exit command is not defined anywhere as a function or as a command in $PATH, and yet, when I type exit, it closes the terminal.  So it clearly is defined somewhere but I can't figure out where.  Where is it defined, and how can I call to it explicitly?
45542
When I enter single quote ' in terminal it goes to some other mode, and commands don't execute. What is this mode and when do we use it?  root@sai:~# ' &gt; ls &gt; ' ls : command not found root@sai:~#
21492
Using the following command, could someone please explain what exactly is the purpose for the ending curly braces ({}) and plus sign (+)?  And how would the command operate differently if they were excluded from the command?  find . -type d -exec chmod 775 {} +
121448
In an information security lab I'm working on, I've been tasked with executing multiple commands with a single call to "system()" (written in C, running on Fedora).  What is the syntax that will allow me to execute more than command through system()?  (The idea being you could execute arbitrary commands through a program running on a remote computer, if the program interacts with the OS through the system() call.)  I.e.:  char command[] = "????? \r\n";  system(command);
79894
Can you explain what this command does:  files=(this_is_filename) for filename in ${files[@]}; do    ls -t1 ../htory/$filename* |     head -1 |     xargs -I fname cp -p fname ../htory2/somefile.CSV done   Especially this part of this command  xargs -I fname cp -p fname ../htory2/somefile.CSV
31975
What can explain the examples below and how do I fix this, preferably without heavy quoting acrobatics? I am using the $n to simulate multiple line command strings, just in case it distracts you from the real question.  ~$ n=$'\n'; sudo -i echo "line1${n}line2${n}" line1line2 ~$   but  ~$ n=$'\n'; sudo echo "line1${n}line2${n}" line1 line2  ~$
47852
I don't do terribly much shell scripting, so I was a little surprised when I was reading  and I saw the syntax they used in this documentation:     A non-zero return from the command in any submodule causes the processing to terminate. This can be overridden by adding || : to the end of the command.   I had to look up that || : was a shorthand for forcing a command to exit successfully.  Anytime I've had to make a command exit successfully, I used || true.  Is || : considered to be more idiomatic?
44866
I have been looking at a few scripts other people wrote (specifically Red Hat), and a lot of their variables are assigned using the following notation VARIABLE1="${VARIABLE1:-some_val}" or some expand other variables VARIABLE2="${VARIABLE2:-`echo $VARIABLE1`}"  What is the point of using this notation instead of just declaring the values directly (e.g., VARIABLE1=some_val)?  Are there benefits to this notation or possible errors that would be prevented?  Does the :- have specific meaning in this context?
81882
What does the command :  ls | wc -l   do? I know     wc &lt;filename&gt;   gives lines, words, and characters, and   wc -l &lt;filename&gt;    print the line count. But how it is being used with ls` is not clear. What does it do?
8264
I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasionally I see a single pipe used: |. What is the difference between those two usages? Are there any caveats when using one over the other or are they interchangeable?
10182
I find myself constantly looking up the syntax of  find . -name "FILENAME"  -exec rm {} \;   mainly because I don't see how exactly the -exec part works. What is the meaning of the braces, the backslash and the semicolon? Are there other use cases for that syntax?
60654
The question is about special variables. Documentation says:     !!:$      designates the last argument of the preceding command. This may   be shortened to !$.        ($_, an underscore.) At shell startup, set to the absolute pathname used  to invoke the shell or shell script being executed as passed in the    environment or argument list. Subsequently, expands to the last argument to the previous command after expansion. Also set to the full pathname  used to invoke each command executed and placed in the environment    exported to that command.    There must be some difference I cannot catch, because:  $ echo "hello" &gt; /tmp/a.txt $ echo "!$" echo "/tmp/a.txt" /tmp/a.txt  $ echo "hello" &gt; /tmp/a.txt $ echo $_ hello   What is the difference?
120014
Very useful when you forget a sudo at the beginning of your command, !! acts like an alias of the previous command. Example : $ mv /very/long/path/for/a/protected/sensible/file/caution.h . (...) Permission denined $ sudo !! sudo mv /very/long/path/for(...) . [sudo] password :   How do we call that double !! trick ? Researches over internet are difficult because of that token. How does it work ? I suspect a link with the history command. Where it is defined ? Can I define some other myself ?  EDIT : Some interesting event designators !!:* It refers to the arguments of the previous command. Use case : cat /a/file/to/read/with/long/path nano !!:*  :p Just print the command without executing it, you have to put it at the end of the event designator. $ !-5:p sudo rm /etc/fstab -f  .
123368
I know people use : instead of / when they are dealing with paths, but  what does :g do in the following sed action?  Why is path1 between quotation mark? Can anyone explain the action of this code?  sed -i -e s:INPUT_REPLACE:"${path1}":g ${path2}