unix


linux - Using the passwd command from within a shell script

from "man 1 passwd": --stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe. So in your case adduser "$1" echo "... Read More


c - What does the brk() system call do?

In the diagram you posted, the "break"—the address manipulated by brk and sbrk—is the dotted line at the top of the heap. The documentation you've read describes this as the end of the "data segment... Read More


linux - How do I get cURL to not show the progress bar?

curl -s http://google.com > temp.html works for curl version 7.19.5 on Ubuntu 9.10 (no progress bar). But if for some reason that does not work on your platform, you could always redirect stderr to... Read More


unix - How can you untar more than one file at a time?

What's going on here? Originally, the tar command was intended for use with magnetic tape devices. Since it only made sense to execute tar on one device at a time, the syntax was designed to assume o... Read More


unix - How to pretty print XML from the command line?

libxml2-utils This utility comes with libxml2-utils: echo '<root><foo a="b">lorem</foo><bar value="ipsum" /></root>' | xmllint --format - Perl'sXML::Twig This command comes with XML::Twig perl m... Read More


linux - Where are all my inodes being used?

If you don't want to make a new file (or can't because you ran out of inodes) you can run this query: for i in `find . -type d `; do echo `ls -a $i | wc -l` $i; done | sort -n as insider mentioned i... Read More


linux - How to make an "alias" for a long path?

Since it's an environment variable (alias has a different definition in bash), you need to evaluate it with something like: cd "${myFold}" or: cp "${myFold}/someFile" /somewhere/else But I actually f... Read More


bash - How to remove files starting with double hyphen?

rm -- --testings.html The -- option tells rm to treat all further arguments as file names, not as options, even if they start with -. This isn't particular to the rm command. The getopt function impl... Read More


unix - Grep for literal strings

You can use grep for that, with the -F option. -F, --fixed-strings PATTERN is a set of newline-separated fixed strings... Read More


shell - What does "&" at the end of a linux command mean?

The & makes the command run in the background. From man bash: If a command is terminated by the control operator & , the shell executes the command in the background in a subshell. The shell does no... Read More