The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl: Extracting date from file name and comparing with current date MKNENI Shell Programming and Scripting 4 03-26-2008 04:01 PM
script to rename files with current date and copy it. logic0 UNIX for Dummies Questions & Answers 6 05-01-2007 06:13 AM
listing files that do not belong to current date esh.mohan Shell Programming and Scripting 1 02-20-2006 10:38 AM
how to find files less than the current date mallikarjuna UNIX for Dummies Questions & Answers 4 01-20-2006 01:49 PM
long listing of files up to a given date rlh UNIX for Dummies Questions & Answers 2 10-27-2000 10:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-20-2006
esh.mohan esh.mohan is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 6
listing files that does not belong to current date

How do we list all the file names in a directory that does not belong to current date.

Last edited by esh.mohan; 02-20-2006 at 10:42 AM..
  #2 (permalink)  
Old 02-20-2006
Bab00shka Bab00shka is offline
Registered User
  
 

Join Date: Apr 2002
Location: Chesterfield, UK
Posts: 123
Use 'find'

from the find man page:

Numeric arguments can be specified as

+n for greater than n,

-n for less than n,

n for exactly n.


so find . -mtime +1
finds all files older then 1 day old
  #3 (permalink)  
Old 02-20-2006
esh.mohan esh.mohan is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 6
can we do it without including the files from subfolders

Hi,

Thanks for ur reply..
that lists the files also from the sub directories..
can we do the same by not listing the files in the subdirectories..i want to list the files only from the current directory..
say if i have two subdirectories in the current directory..I should not get the files from the subdirectories to get listed..i want only the files from the current dir to be listed.
  #4 (permalink)  
Old 02-20-2006
Bab00shka Bab00shka is offline
Registered User
  
 

Join Date: Apr 2002
Location: Chesterfield, UK
Posts: 123
Try using -prune

Your question has been answered here
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0