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

Answers were Sorted based on User's Feedback



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

Answer / sanjeev

find /tmp - mtime -2-----will display file modified in last
two days

find /tmp -mtime +2-----will display file modified in more
than two days

Is This Answer Correct ?    13 Yes 0 No

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

Answer / 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

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

Answer / supriya

#find /tmp -mtime -2 displays the file modified in the last
two days.
#find /tmp -mtime +2 displays the file modified in more
than two days.

Is This Answer Correct ?    6 Yes 1 No

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

Answer / siva

yes this is correct

#find /tmp -mtime -2 displays the file modified in the last
two days.
#find /tmp -mtime +2 displays the file modified in more
than two days.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / manikandan

find /tmp -mtime +2-----will display file modified in more
than three days

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ds gate

Well done Sanjeev.....this is correct...


find /tmp - mtime -2-----will display file modified in last
two days

find /tmp -mtime +2-----will display file modified in more
than two days

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Unix General Interview Questions

What are the core concepts of unix

0 Answers  


How do you switch from any user type to a super user type?

0 Answers  


Is windows 10 unix based?

0 Answers  


What is the root directory in unix?

0 Answers  


Is used to create ordinary files on any unix system?

0 Answers  






What is disk block allocation in unix?

0 Answers  


How can you kill a process in unix?

0 Answers  


Where unix is used today?

0 Answers  


What are the devices represented in unix?

0 Answers  


For which kind of fault the page is checked first?

0 Answers  


What is a unix file?

0 Answers  


Does apple run unix?

0 Answers  


Categories