Linux Assignment 1
Linux Assignment 1
6.Write the command to list all files in descending order of their size.
Ans: Syntax: $ ls -S
7.Suppose there are files temp1, temp2, temp3. Write command to
remove the files without listing them explicitly
Ans: Syntax: 1. $ rmdir temp1 temp2 temp3 (To delete empty directories)
2. $ rm temp1 temp2 temp3
12.Use a single command rmdir once to remove “testdir” and all its sub
directories and files created above.
Ans: Syntax: $ rm -R testdir
14.If you are not able to change to a directory what could be the likely
cause?
Ans: Because the user did not the give the permission to write and execute.
The directory is given the permission to read only.