Advertisement
Tusohian

Linux Commands

Oct 3rd, 2018
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.27 KB | None | 0 0
  1. cd > changing directory
  2.  
  3. ls > seeing list
  4.  
  5. clear > clearing terminal screen
  6.  
  7. cd -  >   backing a from directory
  8. cd ..  >  backing from a directory
  9.  
  10. cd ~   > jump to the home directory
  11.  
  12. mkdir  > making or creating new folder
  13.  
  14. rmdir  > removing or deleting a directory
  15.  
  16. mv > renaming a folder or file
  17.  
  18. touch  > creating a new file
  19.  
  20. rm  > removing a file
  21.  
  22. pwd > Shows the working directory name with path
  23.  
  24. (cat >file1.txt ) > Creating new file with contents
  25. ctrl+z > (to exit from editor of consents)
  26.  
  27. gedit fileName.extension  > for opening a specific file
  28.  
  29. ls b* > show the file list that starts with b and then one or more character
  30.  
  31. ls *l* > shows characters that has before and after some character before and after 'l'
  32.  
  33. ls ?l* > Shows the list that has 1 character before 'l' and one or more character after 'l'
  34.  
  35. ls [rt]*  > Shows the list that starts with 'r' and 't'
  36.  
  37. ls *[0-9]*    > Shows the list that contains numeric number (0-9)
  38.  
  39. ls [^a-k]*    > Shows the list that does not starts with "a" to "k".
  40.  
  41. head -4 ba.txt > shows the first 4 list from the file named ba.txt
  42.  
  43. tail -3 ba.txt > shows the last 3 list from the file named ba.txt
  44.  
  45. sort ba.txt > sort the contents alphabetically
  46.  
  47. nl ba.txt  > Shows the line number of the contents of the file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement