![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 04:40 AM |
| Finding cumulative size of files older than certain days | rohan076 | Shell Programming and Scripting | 1 | 04-28-2008 01:07 PM |
| Removing files older than 7 days | texasoeb | UNIX for Dummies Questions & Answers | 3 | 04-20-2007 04:04 PM |
| tar files older than 30 days | wfch | UNIX for Dummies Questions & Answers | 6 | 04-19-2004 04:40 AM |
| How can I delete files older than 7 days? | odogbolu98 | UNIX for Dummies Questions & Answers | 3 | 02-26-2002 08:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Deleting / finding files older than X days missess a day
Hi
When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example. xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \; total 64 -rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat -rw-rw-r-- 1 oracle xxxd 81 May 1 11:25 ./ful_cfg_tmp_20080430_8.dat -rw-rw-r-- 1 oracle xxxd 81 May 2 11:25 ./ful_cfg_tmp_20080501_9.dat -rw-rw-r-- 1 oracle xxxd 83 May 3 11:25 ./ful_cfg_tmp_20080502_10.dat -rw-rw-r-- 1 oracle xxxd 83 May 4 11:25 ./ful_cfg_tmp_20080503_11.dat -rw-rw-r-- 1 oracle xxxd 83 May 5 11:25 ./ful_cfg_tmp_20080504_12.dat xxxd$ date Thursday May 8 08:59:03 BST 2008 Now, the problem is, we are missing the file for May 06 (Its present in the dir. 'find' is not fetching it.) Could some one point what was the problem with the command. Previously we tried with mtime and atime, and nothing helped us either. ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|