Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Note: All of this assignment should be done from the command line. Note: You can

ID: 3890781 • Letter: N

Question

Note: All of this assignment should be done from the command line. Note: You can check the problems without answer lines by running the command gradelabi.pl 1. What is the flag for the 1s command to show file details? (4 pts) (see: man) what is the flag for the 1s command to show hidden files? (4 pts) What is the flag for the wc command to count words? (4 pts) 2. In your home directory, create a directory named ELE209. Remember, case matters. (4 pts) (see: mkdir, 1s rmdir, mv) 3. In the ELE209 directory, create a directory named lab1. (4 pts) (see: ed) 4. In your ELE209/1ab1 directory, create two directories named pub1 ic and private.(4 pts) 5. Make the public directory world readable and writeable. (4 pts) (see: chmod, 1s) Make the private directory have no access by other users. (4 pts) 6. Copy the filetestfile 1 from the directory /net/common/ele209/1abl to your ELE209/1ab1/public directory. (4 pts) (see: cp) Edit it to insert your name. (4 pts) (see: emacs) 7. Copy the filetestfile2 from the directory /net/common/ele209/1ab1 to your ELE209/1ab1/private directory. (4 pts) 8. Copy the file testfile3.txt from the directory /net/common/ele209/1ab1 to your ELE209/1ab1/public directory and rename it to mytestfile3.txt, (4 pts) (see: mv) Make it readable only by yourself. (4pts) 9. Copy the hidden file (there is only one) from the directory /net/common/ele209/1ab1 to your ELE209/labl/public directory. (4 pts) (see: 1s) 10. Copy the file testhidden.txt from the directory /net/common/ele209/1ab1/subdir to your ELE209/lab1/private directory. (4 pts) 11. In your ELE209/1ab1/public directory, create a symbolic link to the file /etc/hostname and call it myhostname. (4 pts) (see; 1n) What is the contents of this file? (4 pts) (see: less, cat) Get the file http://www.ele.uri.edu/faculty/sendag/ele208/s14/1abs/sample1.txt and put it in your ELE209/1ab1/public directory. (4 pts) (see: wget) What is the size of this file in bytes? (4 pts) (see: 1s, wc) How many lines does this file contain? (4 pts) How many words does this file contain? (4 pts) 12. What is the environment variable HOST set to? (4 pts) (see: echo) How about HOME? (4 pts) 13. heck your answers by running the command gradelabl.pl.

Explanation / Answer

1a)what is the flag for ls command to show file details ?
   ls -l -- it will show file details
  
1b)what is the flag for ls command to show hidden files ?
ls -a -- it will dispaly all files including hidden files

1c)what is the flag for wc command to count words ?
     wc -w   --Counts words. A word is defined as a string of characters delimited by spaces, tabs, or newline characters.
  

2) In your home directory create a directory named ELE209, remember case matters .

change directory to home :
   cd /home
   mkdir ELE209
  
   you can check directory created or not by ls command
   ls -ltr
   bootom one will your directory.
  
3) In the ELE209 directory , create a directory named labl.
   cd ELE209
   mkdir labl
  
4) In your ELE209/labl directory , create two directories named public and private
   cd ELE209/labl
   mkdir public
   mkdir private

5) make the public directory world redable and writable
   chmod +rw public
  
   make the private directory have no access by other users :
   chmod 700 private

6) a) :
   copy /net/common/ele209/lab1/testfile1 /ELE209/lab1/public
  
   b) emcas testfile1
  
7) copy /net/common/ele209/lab1/testfile2 /ELE209/lab1/priavte

8) copy /net/common/ele209/lab1/testfile3.txt /ELE209/lab1/public

   mv testfile3.txt mytestfile3.txt

   chmod 400 mytestfile3.txt

9) cp -a /net/common/ele209/lab1 /ELE209/lab1/public

10) cp /net/common/ele209/lab1/subdir/testhiddeb.txt /ELE209/lab1/private

11) cd /ELE209/lab1/public
   ln -s /etc/hostname myhostname
   cat myhostname
   (or) cat /etc/hostname
  
12) wget -P /ELE209/lab1/public http://www.ele.uri.edu/faculty/sendag/ele208/s14/labs/sample1.txt

   wc -c sample1.txt
   wc -l sample1.txt
   wc -w sample1.txt
  
  
13) echo $HOST
   echo $HOME

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote