The following command will provide detailed information about a directory: ls -d -l. Type ls -l chap1.profile to display detailed information about that program. 1 root root 4 Oct 30 18:42 dhclient-eth0.pidĭrwxr-xr-x. Then you need type this: ls -a This list will list all files. We will use a combination of 'ls" and 'head' command.īelow command will show modified 10 files with the recently updated file at the top $ ls -lt /run/ | head -10 -rw-rw-r.
Let see how to check recently modified 10 files in a directory using ls commands. test/file1 5) Recently modified 10 files
mmin -10 -type f -exec ls -l + -rw-r-r. We can get files modified in last 10 minutes with command below: $ find. 4) Find files modified in Last 10 minutes 1 root root 4 Oct 28 02:50 dhclient-eth0.pidĭrwxr-xr-x. We will use -halt options with ls command to list files of a specific directory in human readable file sizes, long format. It uses K, M, G, and T suffixes (or no suffix for bytes) $ ls -halt /run total 28K If you want to sort by directory, then by dates use $ ls -Rltr 3) Display in Human Readable format finish Then run find: find /path/to/files -type f -newer. rwxr-xr-x 1 root root 12202195 Sep 4 12:21 Linux_64bit.install Start by creating two temp files with specific times to search between. rw-r-r- 1 root root 9718 Jun 23 14:47 ddagent-install.log We will use -ltr options with ls command to list files of a specific directory with recently modified files at the bottom. 2 root root 60 Aug 21 13:18 tuned 2) List Files with Last Modified Date/Time (most recent at bottom) 3 root root 60 Sep 7 23:11 userĭrwxr-xr-x. 1 root root 4 Sep 8 12:41 dhclient-eth0.pidĭrwxr-xr-x. To list files and shows the last modified files at top, we will use -lt options with ls command. 1) List Files directory with Last Modified Date/Time