0

I want to know if there is a way in linux to view a list of files I have edited on a particular day. I know if I do ls -lt it will list folders and files by last modified but I want to see a list of files in subfolders etc and ls -lt only works for the current folder I am in (not files in subfolders).I know on windows explorer for example you can search for file by date modified so I presume there would be something similar in linux but can't see how to do this?

ak85
  • 4,154
  • 18
  • 68
  • 113
  • http://stackoverflow.com/questions/848293/shell-script-get-all-files-modified-after-date – Jayan Dec 12 '12 at 11:38

3 Answers3

1

This will go even into sub directory:

ls -lRt

For excluding any particular directory, use this:

ls | tee | grep -Fxv "folder_name" | xargs ls -lRt
Sibi
  • 47,472
  • 16
  • 95
  • 163
  • this is what I am after thanks. can you add something on the end to exclude a particular folder from this list? – ak85 Dec 12 '12 at 11:40
1

Here is a small example, This may help you.

ls -lRc | grep "Nov 28"

Small description

-l Shows you huge amounts of information (permissions, owners, size, and when last modified.
-R  Includes the contents of subdirectories.
-c  Use time of last modification of the i-node (file created, mode changed, and so forth) for sorting (-t) or printing (-l or -n).
Shantanu Banerjee
  • 1,417
  • 6
  • 31
  • 51
0

You should able to use find with -mtime.

find |path to directory| -mtime -1 -print

Actually Shell Script — Get all files modified after <date> has all the answers.

Community
  • 1
  • 1
Jayan
  • 18,003
  • 15
  • 89
  • 143