What will be the result if we run the command #find /tmp -
mtime -2 and #find /tmp -mtime +2

Answer Posted / kuvaibhav

find /tmp -mtime n where n can be +ve or -ve

+n says, file modified in last n days
-n says, file modified more than n days ago

ex. if today is 5th of a month

file1 has mtime 3rd
file2 has mtime 2nd

then find . -mtime 2 will report file1
then find . -mtime -2 will report file2 only

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the n-th field from a Unix command output?

701


How to remove the last line/trailer from a file in Unix script?

736


How to display n-th line of a file in Unix?

733


What is the procedure to configure MC/SG Cluster services in HP-UX 11i v3 OS Environment?

5670


What is the role of the kernel in unix?

733






What are the advantages of unix operating system?

708


What are shell variables?

651


What is unix buffer cache?

702


What are a shell in unix and its types?

701


Explain a path in unix.

686


What are the types of unix?

650


What are the four components of the unix file system?

656


What do you understand by the term filters?

707


Differentiate relative path from an absolute path?

634


In what way the validity fault handler concludes?

721