PLAYING WITH FILES:
cp:
The cp command is used to copy the contents of one file to another and copies
the file from one place to another.
Syntax:$cp old_file new_file
rm:
The rm command is used to remove or erase an existing file.
Syntax:$rm filename
mv:
The mv command is used to move a file from one place to another,it removes a
specified file from its original location and places it in specified.
Syntax:$mv old_file new_file
ls:
The ls command is used to view the contents of a directory.
Syntax:$ls
ls -a:
To list all the files in the current directory in alphabetical order ls command with
-a is used.
Syntax:$ls -a
wc:
The wc command is used to count the number of words,lines and characters in a file.
Syntax:$wc filename
Options Purpose
-l Used to display only number of lines
-w Used to display only number of words
-c Used to display only number of characters