Display files created on particular date & time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Display files created on particular date & time
# 1  
Old 02-16-2012
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
Moderator's Comments:
Mod Comment Original post contents restored...
Please do not erase the question after it has been answered. Other users looking at this thread later deserve to be able to see what question the remaining posts in the thread are trying to answer.

Last edited by Don Cragun; 02-17-2015 at 03:51 AM.. Reason: Restore original problem statement.
# 2  
Old 02-16-2012
BASH is not a system, BASH is only a shell. BASH running in solaris will have access to a far different set of commands than BASH running in Linux for instance. What's your system? 'uname -a' if you don't know.

How specific a date and time? How do you want to enter the date and time?
# 3  
Old 02-16-2012
Deal Pal ,

Your requirement seems kind of vague .Do ypu want to find out files that are created recently and delete them off ? then try this (with utmost care) .


Code:
find ~ -mmin -2 -type f -print -exec rm {} \;

# 4  
Old 02-16-2012
-mmin is a GNU-only option. You probably won't have it outside of Linux.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

At jobs - created date and time

Hi, I'm running atq for a user and its showing 2 'at' jobs in the queue to start at a later time. > atq Is there any way i can find out the creation date/time of these jobs? and ideally what job created them and what script(s) they are going to run? All i can see is the job number and... (3 Replies)
Discussion started by: finn
3 Replies

2. 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

3. Shell Programming and Scripting

List Files Based On Time & Date

Hi All, I am using HP Unix. I want to list files which are created 5 minutes before on the same day as well as before today's date. I checked all the forums and the commands provided there does not work on HP Unix. Can you please help me on this? Your help is highly aprreciated. Thanks and... (3 Replies)
Discussion started by: angshuman
3 Replies

4. Linux

rename files in a folder with date&time stamp

Hi, I want to rename all the files (more than 100 files) in a fodler to another folder with date&time stamp. foe eg, file1.dat file2.dat file3.dat .. to be renamed as file1100629_16_30_15.txt (yy-mon-dd_hh_mi_ss) file1100629_16_30_16.txt .. so on (2 Replies)
Discussion started by: feroz
2 Replies

5. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

6. UNIX for Dummies Questions & Answers

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... (6 Replies)
Discussion started by: amit_kv1983
6 Replies

7. 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

8. Shell Programming and Scripting

List files created between specific date and time

Hi I need to write a script to list files in a directory created within specific date and time for eg list files created between Apr 25 2007 11:00 to Apr 26 2007 18:00. and then i have to count them Any suggestions pls ? (3 Replies)
Discussion started by: jazjit
3 Replies

9. Shell Programming and Scripting

Determine date and time the file was created through shell scripts

Can I determine when the particular file was created, in korn-shell. Can please someone help me. If possible please mail the solution to me. my mail id: bharat.surana@gmail.com (1 Reply)
Discussion started by: BharatSurana
1 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