The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Deleting files older than 7 days shezam Shell Programming and Scripting 4 07-09-2008 05:40 AM
Removing files older than 7 days texasoeb UNIX for Dummies Questions & Answers 3 04-20-2007 05:04 PM
tar files older than 30 days wfch UNIX for Dummies Questions & Answers 6 04-19-2004 05:40 AM
How can I delete files older than 7 days? odogbolu98 UNIX for Dummies Questions & Answers 3 02-26-2002 08:35 PM
delete files older than 7 days lesstjm UNIX for Dummies Questions & Answers 1 11-06-2001 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 04-02-2008
viv1 viv1 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 21
Script to pick out files from a file which are older than 15 days

Hi ,
I have a file abc.txt which actually contains a directory and file list

-rwxrwxr-x 1 dmadmin mmasapp 334 Dec 03 2001 aafs_006.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1270 Nov 13 2001 mcl_deposit_ftp.ksh
-rwxrwxr-x 1 dmadmin mmasapp 925 Oct 31 2001 run_brc_process1.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1176 Oct 31 2001 run_brc_process2.ksh
-rwxrwxr-x 1 dmadmin mmasapp 976 Sep 27 2001 run_ccs_aggr.ksh
-rwxrwxr-x 1 dmadmin mmasapp 291 Sep 11 2001 update_vol_cntct_prf.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1251 Jul 23 2001 load_pb.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1264 Jul 12 2001 load_pb.ksh_20010612
-rwxrwxr-x 1 dmadmin mmasapp 1250 Jul 02 2001 jc_load_pb.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1250 Jul 02 2001 load_pb.ksh_20010702
-rwxrwxr-x 1 dmadmin mmasapp 525 Jun 12 2001 call_pb.ksh
-rwxrwxr-x 1 dmadmin mmasapp 342 May 25 2001 load_esi_cycle.ksh
-rwxrwxr-x 1 dmadmin mmasapp 254 Oct 11 2000 lch.ksh
-rwxrwxr-x 1 dmadmin mmasapp 207 Oct 09 2000 load_census.ksh
now I need to write a shell script which reads this file abc.txt and picks out all files which are older than 15 days and puts them into another file.

Please help
  #2 (permalink)  
Old 04-02-2008
soemac soemac is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 12
Go to directory where those files are and run this.

find . -maxdepth 1 -mtime +15 -ls
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 05:48 AM.


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