Advertisement
Guest User

Ubuntu Commands

a guest
Nov 14th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. ls -l
  2. List Storage Long
  3. ls -a
  4. List Storage All
  5. ls -la
  6. List Storage Long All
  7. ls -lS
  8. List Storage Sorted
  9.  
  10. ls *.html *.css *.*
  11. Filtered list
  12.  
  13. ls -d*/
  14. list only directories
  15.  
  16. ls -l > file1.txt
  17. Save output of ls to a file
  18.  
  19. mkdir 'My Files'
  20. mkdir "My Files"
  21. mkdir My\ Files
  22. To make a directory with a space in the name
  23.  
  24. mkdir -p parent/child
  25. to make a directory within a directory that doesnt exist yet
  26.  
  27. mkdir -p parent/{child1,child2,child3}
  28. to make a directory within a directory that doesnt exist and make multiple subdirectories
  29.  
  30. cat
  31. Allows writing in terminal
  32.  
  33. cat file1.txt
  34. Outputs contents of the file
  35.  
  36. cat file1.txt file2.txt
  37. Outputs contents of all files in the argument
  38.  
  39. cat > file1.txt
  40. All content written in terminal will be outputted to file
  41.  
  42. cat >> file1.txt
  43. All content written in terminal will be appended to file
  44.  
  45. cat -n file1.txt
  46. Output file contents with line numbers
  47.  
  48. cat -b file1.txt
  49. Output file contents with line numbers and ignores empty lines
  50.  
  51. cat -s file1.txt
  52. Output file contents but only allow 1 empty line between non empty lines
  53.  
  54. cat -sb file1.txt
  55. Output file contents and number only non empty lines
  56.  
  57. cat file1.txt >> file2.txt
  58. Append contents of file 1 to file2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement