search
Log In
6 votes
1.2k views

The shell command

find -name passwd -print

is executed in /etc directory of a computer system running Unix. Which of the following shell commands will give the same information as the above command when executed in the same directory?

  1. ls passwd
  2. cat passwd
  3. grep name passwd
  4. grep print passwd
in Operating System 1.2k views

2 Answers

6 votes
The closest answer is A. However, all of them are wrong.

the find command in this format prints the files that have the name "passwd" in the current directory and in all the subdirectories. Towards this behavior, `ls` command is the only one with a similar output, but it prints the file with the name `passwd` from the current directory only and not from its subdirectories.

Rest of the commands given are concerned with the content of the file "passwd".
–1 vote
option C
1
option C is searching for name inside the file passwd. I dont think any option is correct.
–1

option  c is the right answer ...... it will show the

Find Files Using Name in Current Directory

Find all the files whose name is tecmint.txt in a current working directory.

# find . -name tecmint.txt
./tecmint.txt
0
Did you try it?
0
no ...... but i got this from linux website .... which tell about the commands
Answer:

Related questions

8 votes
2 answers
1
1.6k views
A student wishes to create symbolic links in a computer system running Unix. Three text files named "file 1", "file 2" and "file 3" exist in her current working directory, and the student has read and write permissions for all three files. Assume that file 1 contains ... of information would be lost from her file system? Hobbies Friends Courses I and II only II and III only II only I and III only
asked Nov 3, 2014 in Operating System Ishrat Jahan 1.6k views
0 votes
1 answer
2
445 views
The contents of the text file t1 txt containing four lines are as follows : a1 b1 a2 b2 a3 b2 a4 b1 The contents of the text file t2 txt containing five lines are as follows : a1 c1 a2 c2 a3 c3 a4 c3 a5 c4 Consider the following Bourne shell script : awk - F ' ' ' {Print ... the above script in run? (Note that the given strings may be substrings of a printed line.) "b1 c1" "b2 c3" "b1 c2" "b1 c3"
asked Oct 30, 2014 in Operating System Ishrat Jahan 445 views
0 votes
0 answers
3
172 views
Provide short answers to the following questions: Consider the following sequence of UNIX commands: grep main a.c b.c c.c > grepout & wc < grepout & rm grepout & Why is this not equivalent to the following? grep main a.c.b.c c.c | wc
asked Dec 1, 2016 in Operating System makhdoom ghaya 172 views
47 votes
4 answers
4
5k views
A disk has $8$ equidistant tracks. The diameters of the innermost and outermost tracks are $1$ cm and $8$ cm respectively. The innermost track has a storage capacity of $10$ MB. If the disk has $20$ sectors per track and is currently at the end of the $5^{th}$ sector of the inner- ... contiguous data starting from the sector $4$ of the outer-most track? $13.5 \ ms$ $10 \ ms$ $9.5 \ ms$ $20 \ ms$
asked Nov 4, 2014 in Operating System Ishrat Jahan 5k views
...