Assignment 2
Due: Feb 14th
10 points
The purpose of this assignment is to review the commands from chapters
2 through 4.
Directions:
- Copy the file /home/SRUNET/ClassFolders/as2 to your
directory.
- use nano to edit the file and answer each of the 10 questions below
by echoing the answer. For example, if question 1 was to list all of the
files that end in ".txt", you would answer:
- echo "1. ls *.txt"
- give a detailed listing of all files including hidden files in /bin one
page at a time
- display the value of the builtin variables for your username and userid
- show who is logged on
- give the command to show your current directory
- Using full path names, give the command to give to copy the file "tmp.dat"
in YOUR home directory to the file called "assign1.dat"
in YOUR home directory.
- Using relative path names, give the command to give to copy the file
"junk.txt" in the directory above your current working directory
(i.e, parent directory) to the file called "work.txt"
in the parent directory
- give the command to show the count of characters in all of the files
ending in "txt" in the current directory
- give the command to show the number of lines, words, and characters in
the file named as2
- give the command to remove write permissions for the group and
other from the file named as2
- Using octal numbers, reset the permissions of the file "assign3" so
that only the user has read, write, and execute permissions
To "hand in" this assignment:
- copy your completed file to your dropbox in:/home/SRUNET/ClassFolders/CPSC-207-01.0120
- If your userid is xyz1234, you would issue the command:
- cp as2 /home/SRUNET/ClassFolders/CPSC-207-01.0120/xyz1234/as2