Advertisement
armaannarangs

file globbing and manipulation

Mar 28th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. FILE GLOBBING IN LINUX
  2. ======================
  3.  
  4. # echo * ==> prints everything available
  5. # echo M* ==> displays files starting the character
  6. # echo M*e* ==> it does not only start with 'M' but also contains 'n'.
  7. # touch ==> create a file
  8. # cat ==> displays the info inside a file
  9. # cat > 'filename' ==> will create a file along with the content.
  10.  
  11.  
  12. FILE MANIPULATION
  13. =================
  14. # mv - 1. To rename ==> # mv Hey HeyMo
  15. # mv (old name) (new name)
  16.  
  17. 2. To move ==> # mv (/etc/usr) (/home/Desktop)
  18. # mv (move from) ( moveto)
  19.  
  20. # ls ==> list
  21. # ls -a or -A or -la ==> shows hidden files
  22. # ls -ld ==> will show directory itself
  23. # ls -l /path/ ==> display files from a path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement