Sponsored Content
Top Forums Shell Programming and Scripting copy files based on creation timestamp Post 302528435 by Sheel on Tuesday 7th of June 2011 06:04:01 AM
Old 06-07-2011
You can use the command below to get a list of files modified within a particular time period:

Code:
  find . -name "*.*" -mtime -3

This command gives you the list of file modified in last 3 days.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Moving files based on creation date

Howdy, I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!! Thanks! :D (1 Reply)
Discussion started by: dgoyea
1 Replies

2. UNIX for Advanced & Expert Users

Copy lines from a log file based on timestamp

how to copy lines from a log file based on timestamp. INFO (RbrProcessFlifoEventSessionEJB.java:processFlight:274) - E_20080521_110754_967: rbrAciInfoObjects listing complete! INFO (RbrPnrProcessEventSessionEJB.java:processFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin:... (1 Reply)
Discussion started by: ranjiadmin
1 Replies

3. Shell Programming and Scripting

Move files based on year of creation

Hi All, I have a directory which has crores of files since from 2003 till now. I want to move only the 2003 files to another directory. Please help. Thanks (2 Replies)
Discussion started by: IHK
2 Replies

4. Shell Programming and Scripting

copy lines from log files based on timestamp and sysdate

I am sorry to repost this question. it was not clear, and I had the meeting and didn't response the question on time. I do really need help and appreciate your help very much. I'm looking for a simple shell script that will read lots of audit log file (*.aud) in a log fold every 10 minutes,... (1 Reply)
Discussion started by: percvs88
1 Replies

5. Shell Programming and Scripting

copy lines from log files based on timestamp and sysdate

I'm looking for a command or simple script that will read lots of audit log file (*.aud) in log fold every 10 minutes, and will output to one file based on sysdate - 10 minutes. assume the script is run at 11:12:20, and it should grep the line from Wed Jun 17 11:02:43 2009 to end of file. after... (4 Replies)
Discussion started by: percvs88
4 Replies

6. Shell Programming and Scripting

sort the files based on timestamp and execute sorted files in order

Hi I have a requirement like below I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory My files looks like this PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies

7. Shell Programming and Scripting

Add timestamp and copy files

Please help me with a command to find all files in directory and copy them into another with a timestamp. I have the code to find and copy the files but unable to add timestamp to the files. Below is the find and copy code which i am using(need to add timestamp) find /root/files -name "*.gz"... (8 Replies)
Discussion started by: vel4ever
8 Replies

8. Shell Programming and Scripting

Moving files based on file creation

Hi, I have a directory having so many number of files. Now I want to move the files which are older than one month (lets say) from this directory to another directory (say BKP dir). Simply, if file is olderthan one month move it from source1 dir to BKP1 dir. My file names doesn't have... (7 Replies)
Discussion started by: karumudi7
7 Replies

9. UNIX for Dummies Questions & Answers

Display files based on particular file timestamp

Hi, I have requirement to list out files that are created after particular file. ex. I have below files in my directory. I want to display files created after /dirdat/CG1/cg004440 file. ./dirdat/CG1/cg004438 09/07/14 0:44:05 ./dirdat/CG1/cg004439 09/07/14 6:01:48 ... (3 Replies)
Discussion started by: tmalik79
3 Replies

10. UNIX for Beginners Questions & Answers

Copy files in order of creation date

Hi everyone :-) I ran into a small issue. I would like to copy some files in the precise order they were created. So the oldest files should be copied first and the newest ones last. I tried cp -r $(ls -1t) ./destination but the files are still not sorted properly. I was thinking, that... (11 Replies)
Discussion started by: officiallyme
11 Replies
ff_vxfs(1M)															       ff_vxfs(1M)

NAME
ff_vxfs: ff - fast find: list file names and statistics for a VxFS file system SYNOPSIS
num] num] inode-list] num] file] prefix] special... DESCRIPTION
reads the inode list and directories of each special file, assuming it to be a VxFS file system, and prints inode data for files that match the selection criteria. Output consists of the pathname for each saved inode, plus any other file information requested using the print options below. Output fields are positional. The output is produced in inode order; fields are separated by tabs. The default line pro- duced by is: pathname inumber The pathname is preceded by a dot unless you specify the generic option. The maximum information displays is: pathname inumber size owner The num parameter in the options descriptions is a decimal number, where means more than num days, means less than num days, and num means exactly num days. A day is defined as a 24-hour period. prints summary information to standard error output in addition to the report sent to standard output. Options recognizes the following options: Select a file if the inode has been accessed in num days. Select a file if the inode has been changed in num days. Specify the VxFS file system type. Generate names for any inodes specified in the inode-list. Do not display the inode number after each pathname. Generate a list of all pathnames for files with more than one link. Select a file associated with the inode if it has been modified in num days. Select a file associated with an inode if it has been modified more recently than the specified file. Add the specified prefix to each pathname. The default prefix is dot Print only special files and files with set-user-ID mode (VxFS-specific option). Write the file size, in bytes, after each pathname. Write the owner's login name after each pathname. Echo the completed command line, but performs no other action. The command line is generated by incorporating the user specified options and other information derived from This option allows the user to verify the command line. Operands recognizes the following operand: special Name of a VxFS file system. EXAMPLES
List the pathnames and inumbers of all files in the file system Same as above, but suppress the printing of inumbers: List files on the same file system that have been modified in the last two days displaying the pathname, inumber, and owner's user name List all files on the same file system, including the pathname and inumber of each file, that were last accessed more than 30 days ago Find all pathnames associated with inodes and Execute the command on a VxFS file system FILES
Static information about the file systems. SEE ALSO
find(1), ff(1M), ncheck_vxfs(1M), fstab(4). ff_vxfs(1M)
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy