Need to Move files of different dates


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need to Move files of different dates
# 1  
Old 09-16-2015
Need to Move files of different dates

Hi,

Currently I'm moving the files based on date like below.

"mv *20150901* backup_folder" - Limitation: can move only 1 day files to backup folder.

I want to move the files of different dates like 20150901,02, 03, 04.....

Is there any single command to do it.

Thanks in advance!!
# 2  
Old 09-16-2015
Please use code tags as required by forum rules!

Wouldn't mv *20150901* *20150902* *20150903* backup_folder work?
# 3  
Old 09-16-2015
Thanks for the update.

If we want to move for 30 or 40 days.. then I believe this wont work.

Is there any other to do it for more number of days.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies

2. Shell Programming and Scripting

Deleting the files between particular dates

Hi Please help me for the below task. In my home directory if I run ls -l command, it lists all the files, here I want to delete files created from January 2014 to Aug 2014...but I need to keep the files which are created after September 01 2014. Thanks Siva (3 Replies)
Discussion started by: kumar85shiv
3 Replies

3. Shell Programming and Scripting

Files between two dates in UNIX

Hi Team, I need to connect to a prod server and need to get the files which falls between two dates. I should not create ant files on that machine. I am using korn shell. Your help is very much appreciated. Vinay (13 Replies)
Discussion started by: gvkumar25
13 Replies

4. UNIX for Advanced & Expert Users

Find all files other than first two files dates & last file date for month

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies

5. Shell Programming and Scripting

Move all files except sys date (today) files in Solaris 10

I want to move all files from one directory to another directory excluding today (sysdate files) on daily basis. file name is in pattern file_2013031801, file_2013031802 etc (2 Replies)
Discussion started by: khattak
2 Replies

6. UNIX for Dummies Questions & Answers

How to move files between 2 dates from one directory to another

Hi All, I am coding for a requirement where I need to move files (filename.yymmdd) from one directory(A) to another(B) based on 2 date fields in a paramtere file. (Paramfile.txt) For e.g: In Paramfile.txt, BUS_DT =20120612 SUB_DT =20120602 In this case, i need to move all the files... (14 Replies)
Discussion started by: dsfreddie
14 Replies

7. AIX

Copy files for particular dates

Hi, I need to copy particular date files from one directory to another. For example, I have thousands of files in /home/usr From this I need to copy only particular date files (each date contains thousand number of files) to some directory of another server. Could anyone please help me... (3 Replies)
Discussion started by: teddy2882
3 Replies

8. UNIX for Dummies Questions & Answers

files between any two given dates

Can any one help me in getting all the files between any two given dates.. (8 Replies)
Discussion started by: thanuman
8 Replies

9. UNIX for Dummies Questions & Answers

Files and dates

Hello all. I am trying to do a file listing on a particular directory by date. I need to list the files and their directories that have a timestamp between Dec-1-2006 and Jan-1-2007. Any help would be greatly appreciated. (1 Reply)
Discussion started by: mastachef
1 Replies

10. UNIX for Dummies Questions & Answers

Remove files by dates

I've tried every way possible to remove files by date and nothing seems to work. Does anyone have an idea how to remove files by dates? Thanks in advance.... (1 Reply)
Discussion started by: dman110168
1 Replies
Login or Register to Ask a Question