How do I delete files older than 2 days unix?



How do I delete files older than 2 days unix?..

Answer / Nisha Saini

You can use the `find` command with the `-mtime` option to find files modified more than 2 days ago and then delete them using `rm`. Example: `find /path/to/directory -type f -mtime +2 -exec rm {} ;`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix General Interview Questions

Is unix os free?

1 Answers  


Explain pid.

1 Answers  


Explain kernal and shell?

1 Answers  


What is the home directory in unix?

1 Answers  


How can you edit a large file without opening it in unix?

0 Answers  


Does windows use unix?

1 Answers  


Define a single-user system.

2 Answers  


How old is unix?

1 Answers  


Which file system is used in unix?

1 Answers  


Is a form of interprocess communication in unix?

1 Answers  


What is a filter in unix?

1 Answers  


What is .login file in unix?

1 Answers  


Categories