Linux (Unix) Commands – File system commands
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
• 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
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- linux terminal commands cheat sheet
- unix commands for windows 10
- linux network commands cheat sheet
- linux shell commands cheat sheet
- all unix commands with examples
- list of unix commands pdf
- linux bash commands cheat sheet
- linux redhat commands pdf
- windows 10 system commands list
- linux shell commands list
- linux mint commands list pdf
- linux terminal commands pdf