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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityYou 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
find . -newermt "Aug 3 5:27" -delete
Aug 14, 2017 at 9:59
I know the most voted solution may work for alott of people but it did not for me. I had to do it with unix timestamp.
find . -type f -newermt "$(date -d @1494500000)" -delete
You can convert the timestamp easily with a unix timestamp converter.