Display files created on particular date


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Display files created on particular date
# 1  
Old 04-22-2008
Display files created on particular date

hi , i am trying to display the files created on a particular date. I have tried using find .-mtime +n but these files are created on november 6th 2007 , so i'm not sure of what the 'n' value should be. And the number of files created on that particular day are more than 5000 so i have to make a list of those files created along with the time and date of creation . Can anyone of you can help me out i achieving this.............
# 2  
Old 04-22-2008
Code:
ls -l | grep "Nov  6" | awk '{print $9" "$6" "$7" "$8}'

This lists filename, Date, Time
# 3  
Old 04-22-2008
Thanks alot man , its working .And i need another help , the files which are created are of the following format "index.log.08 Nov 07 03.29.15.zip" . This zip file is having spaces in its name , how can i delete file's of this type.
# 4  
Old 04-22-2008
Code:
ls *\ *

Check if the above commands lists required files.

If it is successful then you can issue the dangerous rm command.
Code:
rm *\ *

Be cautious in removing files. Make sure the pattern matching works fine.
# 5  
Old 04-24-2008
rm *\* isn't working man. Instead i've used ur command to create a file having a list of all the file's to be deleted. Using this command [COLOR="Red"]ls -l | grep "Apr 23" | awk '{print $9"|"$10"|"$11"|"$12}' > list_file.sh/COLOR] , this approach is working fine for all the files created on April 3 but now i've to modify this command to delete all the files created one month before the current calender date . Do you have any idea idea abt it ????
# 6  
Old 04-24-2008
Soory , i meant April 23 in last post . The approach i'm trying is that i've written a shell script which call's this the command "ls -l | grep "Apr 23" | awk '{print $9"|"$10"|"$11"|"$12}' > list_file.properties" . I'm calling the file created by the above command in the same script and concatanate the various parameter's present in file line by line . There by deleting the file by firing the command rm "file name without spaces". This is working .Now I have to set up a cron to fire this script every month whereby it should delete the file created one month back.
# 7  
Old 04-24-2008
May be you should have a look at Perderabo's datecalc
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies

2. Shell Programming and Scripting

Copy files based on last created date

Hi, I have a requirement to copy files from a windows network drive to a Linux server using shell script based on the last created date. Ex: FileName CreatedDate/Time F1 05-01-2012 3:00 PM F2 05-01-2012 3:15 PM F3 05-01-2012 2:00 PM When i run the shell script... (1 Reply)
Discussion started by: Lee_10
1 Replies

3. Shell Programming and Scripting

Display files created on particular date & time

Hi , I have BASH system & i am trying to display the files created on a particular date and time, and after displaying those files I also want to delete all those files.Can anyone of you help me out for this............. Thanx Original post contents restored... Please do not erase the question... (3 Replies)
Discussion started by: rakeshtomar82
3 Replies

4. Shell Programming and Scripting

Showing files that were created at a certain Date

Guys i am having a bit of a trouble finding the creation date of a file. What i have to do is to redirect the output of a command (which i believed was ls -l but this command shows only the Modification time) into a file, which will contain all the files that were created on a certain date, for... (2 Replies)
Discussion started by: jimas13
2 Replies

5. Shell Programming and Scripting

print out date of files last created??

Hello everyone, I have this script here: use Time::Local; opendir (D, $ARGV) or die "Cant open"; foreach $file (readdir D) { $path = "$ARGV/$file"; next if ! -T $path; $last_mod = (stat $path); ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime ($last_mod); printf "%-15s:... (4 Replies)
Discussion started by: new bie
4 Replies

6. Shell Programming and Scripting

Delete files created before specific date.

There is a system logging a huge amount of data and we need to delete some of the older logs .I mean the files that are created before one week from today. Here is a listing of files that are sitting there: /usr/WebSphere/AppServer/logs # ls -l -rw-r--r-- 1 root system 3740694 May... (5 Replies)
Discussion started by: moustafashawky
5 Replies

7. Shell Programming and Scripting

Remove files which created date before 10 days on HP-UX

Hi All, Could you please let me know if there is any one can help to create a shell script to remove some files which is the created date for them greate than 10 days (sysdate-10) Please try to email me on email removed Thanks in advance, Murad (1 Reply)
Discussion started by: murad_fayez
1 Replies

8. Shell Programming and Scripting

Copying files created after a specified date/time

I need to write a script that copies files from one directory to another that were created after "today 6:30". This script will be NOT be ran at the same time each day. any help is appreciated. (2 Replies)
Discussion started by: jm6601
2 Replies

9. Filesystems, Disks and Memory

How to list files with specific created date

Hi, Would like to ask, which command is used to list all the files for specific date (says 1st May) and its size, for all files (including its subdirectory), in a mounted NFS disk to HP-UX. I would like to check for the total files came into my disk on 1st May. Very much appreciating your... (2 Replies)
Discussion started by: Draculla
2 Replies

10. Shell Programming and Scripting

display files created in a particular month

hi, i m new to unix. I have been trying to find all the files in my home directory and its subdirectories that are created in the month of september. Can anyone please help me with this??? (1 Reply)
Discussion started by: t_harsha18
1 Replies
Login or Register to Ask a Question