|
Write a single Unix command to save the current date and time into a file called current_date. This file should only contain the current date and time. (1 mark)
Write a single Unix pipeline command to display a sorted list of all unique lines in a file called phone_numbers.txt. (2 marks)
Write a single Unix pipeline command to display the total number of files begining with a number, but not ending with two numbers. (2 marks)
Write a single Unix pipeline command to display only the file-type information for file types called ascii (either uppercase or lowercase - 2 marks)
Write a single Unix pipeline command to display the number of times that you are logged into the current server (make certain to use one environment variable - 2 marks)
Write a single Unix pipeline command to display only lines 7 to 14 for a file called “input” contained in your current directory (2 marks)
Write a single Unix command to display all pathnames containing the utility grep or all pathnames containing manual pages for the grep utility. (1 mark)
All answers are based on the following tree diagram displayed below. You can assume that your Matrix username is called skywalkr and you will be currently located in the directory called /home/skywalker for each of the following questions. Assume all questions are independent of one another. skywalker and obiwan belong to different groups.
/home
|- skywalkr
| |-- jedi_manual.txt
| |-- rebel.TXT
| |-- create_force1.TXT
| |-- create_force2.c
| |-- HOMEWORK1
| |-- HOMEWORK2
| |-- POD_RACER
| |-- op_manual.txt
| |-- schedule
| |-- june.txt
| |-- august.txt
|- obiwan
| |-- create_force1.TXT
| |-- light_saber.txt
| |-- pointers.c
| |-- TRAINING
| |-- jedi_mind_trick.txt
Write a single Unix command to add the following directory path starting from the POD_RACER directory. (1 mark)
POD_RACER
|-- MANUALS
|-- PARTS
|-- FUSION
Write a single Unix command to allow the user obiwan to at least read the files in your schedule directory. You can assume you have pass-through permissions in your home and POD_RACER directories. (2 marks)
Write a single Unix command to copy all text files (i.e. files that end with an uppercase or lowercase .txt ) in obiwan’s home directory to your home directory. Make certain that you do not accidentally overwrite any of your files. (2 marks) |
|