touch <filename> |
Create a file |
touch .<filename> |
Creates a hidden
file |
pwd |
Displays current
directory path |
whoami |
Displays current
user id and name |
w |
Display who is
logged in and what they are doing |
ls |
Lists files and directories |
ls -l |
Lists files and
directories, size, modified date and time, its permission |
ls -a |
Lists files and directories along with hidden |
ls -F |
Lists files and directories where directories has a /
at the end |
ls ?.* |
Lists files
with single character and any extension |
ls ?.doc |
Lists files
with single character and doc extension |
ls a*.doc |
Lists files
with started character a after that any letters and doc extension |
ls *.doc |
Lists files
with only doc extension |
ls [a-d]*.doc |
Lists files
with only doc extension and name should be between a to d |
cat <file> |
Displays content of
file |
cat ><file> |
Creates file and
takes input |
cat <file> <file> |
Displays content of
two files |
cat >><file> |
Displays content of
file and takes input |
cp <file> <file> |
Copy one file to other |
mv <file> <file> |
Copy/Renames file from
one location to other |
rm <file> |
Removes file |
rm <Dir> |
Removes empty directory |
rm -r <Dir> |
Removes non empty
directory |
|
|
Learning
Wednesday, December 23, 2020
Linux Commands
Subscribe to:
Posts (Atom)