Useful Linux shell command

Remove all files & folders

Above will pop prompt to ask for confirm on each file. So ignore that by use following:



Move all files/folders including hidden files to another folder

You could turn on dotglob:

In order to turn off dotglob, you’d need to say:

 Copy all the files and directories including hidden files and directories

 Set up umask

What is Umask and How To Setup Default umask Under Linux?

Restart bashrc


Command short cut

  • ctrl+u Delete all line
  • Ctrl+w delete word by word
  • ctrl a/e go to start/end of line