Linux Common Orders


  • man: watch order docs

  • mv, cp: move file, copy file

  • find: find file better tool: ack other similar order: grep, awk

  • tar: compress file

  • rsync: a fast, versatile, remote (and local) file-copying tool

  • lsof -i:8000: checking 8000 port usage

  • ps: display running processes

  • kill -9 pid: force a process to exit based on its pid

  • pipe: A pipe can take the stdout output of the previous command and use it as the stdin input for the next command. With the pipeline character we can implement some slightly more complex automated scripting functions example: ps | grep -i "node" | awk '{print $2}' | xargs kill -9

  • tree: show directory structure

  • time ls: count the total time spent on the given command

  • ssh: OpenSSH remote login client

Useful Orders

  1. create a file, which its name is

$ touch 2021/"$(date +"%F")"
  1. Add same content in many files

for file in $(find . -name "*.md"); do
  echo Processing $file

  cat beginning.txt $file > $file.modified

  mv $file.modified $file



  1. mkdir folder && cd $_: Create folder and open it

  2. chmod +x script make script executable

  3. wget -T 5 -t 10 -Q 500m -nH -r -E -l inf -k -p -np '' download a website ref

  4. curl -V | curl -F "[email protected]" "" 粘贴代码

  5. unrar x file.rar /path/to/file

  6. hide GRUB message sudo vim /etc/default/grub


then sudo update-grub