Creating files :
cat (Concatenate) command is used to create a file and to display and modify the contents of a file.
Example :
cat -> command is used to create a file.
file1 -> line is user mentioned a file name.
Ctrl+d (To save the file)
To display the content of the file :
# cat (filename)
To append the data in the already existing file :
# cat >> (filename)
Ctrl+d (to save the changes)
Creating multiple files at same time using touch command :
#touch (filename) (filename) (filename)
check the files permissions , user and group details use # ll command.
Creating a Directory:
#mkdir (dir name)
check the files permissions , user and group details use # ll command.
Copying files into directory:
#cp (source filename) (destination directory)
#cd command is used to change directory.
Moving files from one location to other:
#mv (filename) (Destination directory)
Renaming a Directory :
Command for renaming the directory.
#mv (old name) (new name)
Removing a File :
#rm filename
Removing an Empty directory :
#rmdir (dirname)
Filter commands:
less:
less command can be used to read the contents of a text file.
more:
more command can be used to read the contents of a text file.
head:
head command used to show top 10 lines of a text file.
tail:
tail command used to show last 10 lines of a text file.