I have below two situations to handle,
1. I have list of files with file names having date&time. I have to backup to old date files. say I have below files in a directory,
Now, I have to keep the files 1 and 2 and backup the files 3 and 4 into other dir.
2. I have list of files in a dir and I have list of file names in a file xx123. I need to find files present in dir and not in xx123 and vice versa. is there any short way to do this?
Thanks,
Raja.
Last edited by Franklin52; 10-06-2010 at 03:26 AM..
Reason: code tags
Hi All,
I have a situation where I need to copy the files having the latest date.
For example I have a file by name bas100e1_jun05. I need to copy it to bas100e1. But when a file by name bas100e1_jul05 is put in the same directory the script should copy the file having the latest month which... (34 Replies)
I want to loop through files in a directory but omit the file with the latest date in my list of files. How would I accomplish this?
Thanks (2 Replies)
Guys,
I've got a quick logic question. I'm pretty savvy when it comes to shell scripting, however, I'm at a loss when it comes to writing a simple shell script to backup only certain files out of the month. I have a directory, for example, /data/backups/websites/domain. In each "domain"... (5 Replies)
Hi everyone,
Please help:)
I have a list of 1000 different files which comes daily to the directory.Some of
the files are not coming to the directory now.
I need to write a shell script to find the latest date and time of the files they
came to the directory. The files should be unique.... (1 Reply)
Hi,
I grep for a pattern in a list of files.
"grep -i -l $pattern *.datx*"
it may give me n number of files.
say for eg, it gives me 2 files.
lock_eicu_20071228_00000000.dat_20071228_05343100
lock_eicu_20080501_00000000.dat_20080501_05343900
out of these 2 files I need to get the... (7 Replies)
hi all,
not sure if this has been posted b4 but i try to search but not valid.
this is my question:
when i do a ls -ltr there will be a list generated as follows:
-rw-r--r-- 1 root sys 923260 Jan 10 04:38 FilePolling.41025.083TL021.xml
-rw-r--r-- 1 root sys 1761337 Jan 10 04:40... (12 Replies)
Hi Folks,
I have one query that there is a folder in which daily several logs files are getting created , I reached to that location through putty but what I observer that 10 files of different date are been created with same name , what I need to see is the latest file ...let say the location is ... (5 Replies)
HI
I have folder in home dir.
/home/kpp/07222013
/home/kpp/07212013
/home/kpp/07202013
Output :--
/home/kpp/07222013
Just find latest date (5 Replies)
Discussion started by: pareshkp
5 Replies
LEARN ABOUT DEBIAN
backup-manager-purge
BACKUP-MANAGER-PURGE(8) backup-manager-purge BACKUP-MANAGER-PURGE(8)NAME
backup-manager-purge - backup-manager's wrapper for outdating files
SYNOPSIS
backup-manager-purge [TTL] <options>
DESCRIPTION
backup-manager-purge is the only authorized entity that can say if an archive should be purged or not. Any tasks used by backup-manager may
have to know if an archive is deprecated (eg: the purging phase of an upload method). This tool is here to fulfill that need.
Given a time to live (TTL) and a list of archives, backup-manager-purge will return another list of archives, corresponding to the ones
that are outdated by the TTL.
REQUIRED ARGS --ttl=time-to-live
Specify the time to live (in days) for the archives. Any archive that is older than ttl days will be outdated.
OPTIONAL ARGS --files-from=file
A file containing a list of archives to parse, one archive per line. If this option is not used, STDIN will be used for catching the
files to parse.
RETURN
backup-manager-purge will return the list of outdated files on STDOUT, one file per line.
ERROR CODES
If an error occurs, it will print the error message on stderr and will exit with an error code greater than 0.
Here are the possible error codes:
bad command line (wrong arguments) : 10
internal error (should be reported as a bug) : 20
SEE ALSO backup-manager(8)backup-manager-upload(8)AUTHORS
Concept and design by Alexis Sukrieh and Jan Metzger.
perl v5.14.2 2012-05-09 BACKUP-MANAGER-PURGE(8)