#Linux find file recursive full
printf '% %t %p\n' | sort -k 1 -n | cut -d' ' -f2-īelow is an example output from running this full command. If you have a lot of output piping the whole lot into ‘less’ may be a good idea so that you can easily scroll through.
The most recently changed contents will be at the bottom of the list, so after running it you’ll see the most recent changes with the older changes as you scroll up. So here are the simple commands piped together, run this within a directory and you will be provided with a list of all files and subdirectories along with the date they were last modified. By seeing other files that were modified around the same time you can get a better idea of what took place and when, allowing you to correlate these events with your logs. This is one of my favourite commands to use when trying to build a timeline of events, for instance if a server or website has been compromised and you want to see when files have been modified with malicious content.
Have you ever wanted to view a list of all files or subdirectories within a directory in Linux and order them by when they were last changed or modified? Then you have come to the right place! Here we are going to provide and explain some useful commands that when piped together will give us this result, allowing us to recursively list files and directories by date.