I want to remove files, more specifically, symbolic links of /usr/include that are newer than 2 JUN 22:27

How can I do this?


You might want to use find -newermt.

Make sure to review files to be removed first:

find /usr/include -type l -newermt "Jun 2 22:27"

Use -delete to perform actual removes.

find /usr/include -type l -newermt "Jun 2 22:27" -delete
  • 1
    Extra info, delete normal files from current directory, example: find . -newermt "Aug 3 5:27" -delete – Harkály Gergő Aug 14 '17 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.