Display the text inside the file - cat command
syntax: cat filename.txt
Check which commands the user has run till now -
syntax: history
Remove a directory(rm -r) -
To remove an empty directory rm -r, where -r is for recursively
syntax: rm -r dir_name
for forcefully remove use -
syntax: rm -rf dir_name
create filename fruits.txt and add some fruits name
Tail command - used to show the last 10 lines of a file
Syntax: tail file_name
where -3 is for the last three lines
Head command - used to display the first 10 lines of a files
Syntax: head file_name
Diff command -used to show the difference between files
syntax: diff file1 file2
Change access permission (chmod)
used to change the permission of a file, we've different numerical values as follows -
Operation | Value |
Read | 4 |
Write | 2 |
Execute | 1 |
syntax - chmod 444 file_name