Xref: utzoo comp.unix.questions:7560 comp.unix.wizards:9310 Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!ccicpg!turnkey!conexch!root From: root@conexch.UUCP (Larry Dighera) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: -since option for ls -lt Summary: Use find -ctime n Keywords: options ls find Message-ID: <355@conexch.UUCP> Date: 8 Jun 88 16:06:11 GMT References: <344@ajpo.sei.cmu.edu> <10981@cgl.ucsf.EDU> Reply-To: root@conexch.UUCP (Larry Dighera) Organization: The Consultants' Exchange, Orange County, CA. (714) 842-6348 Lines: 35 In article <10981@cgl.ucsf.EDU> seibel@hegel.mmwb.ucsf.edu.UUCP (George Seibel) writes: >In article <344@ajpo.sei.cmu.edu> jrkelly@ajpo.sei.cmu.edu (John Kelly) writes: >> >>In VMS and TOPS-20, the directory listing commands have a /since option that >>allows one to easily obtain a list of files modified since a specified time >>and date. [...] > >I also find this a very useful thing to have. After the e/f/grep mess is >cleaned up, maybe someone will do some work on ls. In the meanwhile, I >find the following alias very helpful: >alias lst5 ls -lst | head -6 >This shows you the 5 newest files, plus the total space used in the directory. I didn't see the original article that spawned this discussion, but it is a simple matter to get a listing of the files that have been changed within n days. Try this: find . -ctime -n -exec ls -l {} \; Where n is the number of days. Use -n to see all files newer than n-days old, and +n to see all files older n-days old. You can also use all the other useful options to find like -type, -user, -size, ... There is a problem with this approach however, there's no way that I am aware of to prevent find from descending the directory tree. There's yet another option that would be useful for find. Best Regards, Larry Dighera -- USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA 92712 TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71) UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp UUCP: ...!uunet!turnkey!conexch!root || ...!trwrb!ucla-an!conexch!root