File Commands


file

ls
Directory Listing

ls

ls -al
Listing with Hidden Files

ls -la.png

cd
Changed to home

cd

cd /home
Changed directory to /home

home

pwd
Current Directory

pwd

mkdir
It will create a Directory

home

rm
Delete File

rm

rm -r
Delete Directory

rmr

rm -f
Force Removing a File

rmf

rm -rf
Removing Directory

rmrf

cp file1 file2
Copy file1 to file2

cp

mv file1 file2
Rename file1 to file2

mv.png

touch
Create (or) Update a file

touch

cat > file
Place Standerd input to file

cat

ls -lh
It will display list of files with permissions

lslh

ls | more
Output contents of the files

more

ls | less
Output contents of the files

less

head
Display first 10 lines

head

tail
Display last 10 lines

tail

tail -f file
Output contents of files

tail

ll
Listing all files

ll.png

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s