Shell Language


alias copy="cp"

Next time when the command "copy" is read in the shell, the command "cp" will be executed.


grep -R 'ABCD' .

Print lines that contain 'ABCD'

grep -R 'ABCD' . | grep -v 'tags'

Print lines that contain 'ABCD', and do not contain 'tags' (exclude lines that contain 'tags').

make all | grep 'ABCD'

Print all lines that are generated by make command and contain 'ABCD'


find /home *.c

Find all files with ".c" name in home directory

find -name abc.c

Find the file "abc.c" in the current directory or its subdirectory


ctags -R .

Build tags in the current directory. After that, we can use ctrl+] and ctrl+t to trace code.

Pipe & Input & Output

sign < dictionary.txt | sort | squach > gramlist.txt

Run program sign with input dictionary.txt, and then feed the output to program sort, and then feed the output to program squach, and then put the output into gramlist.txt

Reference — Check 32 bits or 64 bits

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License