Read the following scenario. Provide the command(s) in the context of the environment established in the scenario. Write your answers on the lines under each question.

1. List files in your current directory that are 5 days old.
2. List files in your home directory that are larger than 6 blocks
3. Find all hidden files pathnames, starting from your current directory.
4. Starting from your current directory, find and delete all instances of myfile.
5. Starting from your current directory, find and delete all instances of myfile and ask for confirmation before deletion.
6. Starting from your current directory, find all the files that their filenames are two characters.
7. Display the last 20 lines of the file called xyz.
8. Starting from your current directory, find all instances of the files with .cpp extension
9. Starting from your home directory, find all the files that their names start with letter A, B, C, or D.
10. Starting from your home directory, find all the files that their names end with letter A, B, C, or D.
11. Display first 5 lines of the file named Xfile
12. Display how many lines are in the file named Xfile
13. Display the first 3 fields of the file named Xfil, using the space character as field delimiter
14. Append the file named Xfile to a file named Zfile
15. Append files named Afile,Bfile and Cfile to a file named Zfile
16. Rename a file called Xfile to Zfile
17. Display the content of the Xfile one screen at a time.
18. Copy a file named Xfile to a file named Zfile and as ask for confirmation before coping the files
19. Display the last 10 lines of the Xfile
20. Link (create another reference name) Xfile to Zfile


1. List files in your current directory that are 5 days old.
=>>find . name "*" atime 5 print
2. List files in your home directory that are larger than 6 blocks
=>>find . name "*" size 6 print
3. Find all hidden files pathnames, starting from your current directory.
=>>find . name ".*" print
4. Starting from your current directory, find and delete all instances of myfile.
=>>find . name "myfile" exec rm {}\;
5. Starting from your current directory, find and delete all instances of myfile and ask for confirmation before deletion.
=>>find . name "myfile" ok rm {}\;
6. Starting from your current directory, find all the files that their filenames are two characters.
=>>find . name "??" print
7. Display the last 20 lines of the file called xyz.
=>>tail +20 xyz
8. Starting from your current directory, find all instances of the files with .cpp extension
=>>find . name "*.cpp" print
9. Starting from your home directory, find all the files that their names start with letter A, B, C, or D.
=>>find . name [A D]* print
10. Starting from your home directory, find all the files that their names end with letter A, B, C, or D.
=>>find . name *[A D] print
11. Display first 5 lines of the file named Xfile
=>>head -5 Xfile
12. Display how many lines are in the file named Xfile
=>>wc -l Xfile
13. Display the first 3 fields of the file named Xfil, using the space character as field delimiter
=>>cut -f 3 -d " " Xfile
14. Append the file named Xfile to a file named Zfile
=>>cat Xfile >> Zfile
15. Append files named Afile,Bfile and Cfile to a file named Zfile
=>>cat Afile Bfile Cfile >> Zfile
16. Rename a file called Xfile to Zfile
=>>MV Xfile Zfile
17. Display the content of the Xfile one screen at a time.
=>>more Xfile
18. Copy a file named Xfile to a file named Zfile and as ask for confirmation before coping the files
=>> cp -i Xfile Zfile
19. Display the last 10 lines of the Xfile
=>>tail -10 Xfile
20. Link (create another reference name) Xfile to Zfile
=>>ln Xfile Zfile

Computer Science & Information Technology

You might also like to view...

A(n) ____ variable is any group of characters, such as "Hello" or "Happy Holidays!".

A. Boolean B. data C. text string D. null

Computer Science & Information Technology

The symbol used in Excel to indicate division is ________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What happens if you drag a clip from the Source Monitor into the Program Monitor?

What will be an ideal response?

Computer Science & Information Technology

Mobile devices are typically built with a limited amount of main memory and a relatively slow CPU. Therefore Android apps are explicitly designed to require no resources when they are dormant.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology