Linux (Unix) Commands File System Commands

Linux (Unix) Commands File System Commands

<p>Linux (Unix) Commands – File system commands  ls – list directory contents ls [OPTION]... [FILE]... Option: -l use a long listing format -a all, do not hide entries starting with .  mkdir – make directories mkdir [OPTION] DIRECTORY...  cd – change working directory cd directory Note: cd . Means cd to current working directory cd .. Means cd to the parent (one up) of the current directory cd ~ Means cd to home directory  pwd - print name of current/working directory  mv – move (rename) files mv [OPTION]... SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY  cp - copy files and directories cp [OPTION]... SOURCE DEST cp [OPTION]... SOURCE... DIRECTORY</p><p> rm - remove fies rm [OPTION]... FILE...  rmdir – remove empty directories rmdir [OPTION] ... Directory  chmod - change file access permissions chmod [OPTION]... OCTAL_MODE FILE... drwxrwxrwx d indicates a directory, - indicates a file Remaining symbols indicate permission Left group of 3 indicates file permissions of owner Middle group of 3 indicates file permissions for those in file group Right group of 3 indicates file permissions for all others For files: r (or -) gives read permission (or not) w (or -) gives write permission (or not) x (or -) gives execution permission (or not) For directories: r (or -) gives list files in directory permission (or not) w (or -) permission to delete files from directory or move files to it x (or -) permission to access files in the directory OCTAL_MODE examplex 777: sets all 9 permission bits (i.e. -rwxrwxrwx) 644: sets 4 of the permission bits (i.e. -rw-r—r--) 755: sets 7 of the permission bits (i.e. Rwxr-xr-x)  find - search for files in a directory hierarchy find [path...] [expression] Examples: find . -name dsb find . -name ‘*dsb*’ find /tmp -name dsb</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us