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

Unix/Linux Part 1. What commands accomplish the following? 1. What options to ls

ID: 3755365 • Letter: U

Question

Unix/Linux

Part 1. What commands accomplish the following? 1. What options to ls accomplish the following A. Lists all files, including dot files. B. Provides a long listing of information about the files. C. Identifies directories with a / 2. What command line outputs a number that is the total number of files, including dot files, listed in the current directory? 3. What command obtains information about the ps utility? 4. What command sorts the contents of all files in the current directory with names beginning with the letter f? 5. In the following commands, how does each utility interpret each argument? A. echo dogfish B. rm dogfish C. grep dogfish 6. What command creates a new file called all consisting of the lines in the files filel,file2 and file3? 7. Explain what each of the following command lines accomplish A. grep Linux is fiun'* B. sort > file4 C. grep SUSER letc/passwd D. echo SPATH SPATH E. grep 123' F. set -o EOF

Explanation / Answer

1. What options to ls accomplish the following:

A. Lists all files, including dot files ls -a | egrep '^.'
B. Provides a long listing of information about the files ls -l
C. Identifies directories with a /. ls a /.

2. What command line outputs a number that is the total number of files, including dot files, listed in the current directory?

Sol) ls | wc -l

3) What command obtains information about the ps utility?

Sol) Process Status(ps) command displays information about active processes.
  
Command ps -c

output:
PID CLS PRI TTY TIME CMD
13629 TS 19 ? 00:00:00 sh
13635 TS 19 ? 00:00:00 timeout
13636 TS 19 ? 00:00:00 bash
13637 TS 19 ? 00:00:00 ps

4) What command sorts the contents of all files in the current directory with names beginning with the letter f?

Sol) ls f*.* | sort

5) In the following commands, how does each utility interpret each argument?

A. echo dogfish display dogfish
B. rm dogfish remove dogfish file
C. grep dogfish search dogfish word

6) What command creates a new file called all consisting of the lines in the files file1,file2 and file3?

Sol) cat file1 file2 file3 > myfile

7) Explain what each of the following command lines accomplish:

A. grep 'Linux is fun' *: This command search 'Linux is fun' sentence in all file in the current directory

B. Sort > file4: This command is used to sort of content of file4 file in the current directory.

C. grep $USER/etc/passwd : This command is used to search USER Account passwd

D. echo $PATH $PATH: This command is used to display PATH like this
$PATH /home/cg/root/GNUstep/Tools:/usr/GNUstep/Local/Tools: etc.,

E. grep '1 2 3' f*: This command seach '1 2 3' content in all stat f* files

F.set -o EOF: This command is used to set option name is EOF

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