Sponsored Content
Top Forums Shell Programming and Scripting RE:backup files older then 24hrs to a new directory . Post 302070251 by amceyeson on Monday 3rd of April 2006 11:14:25 AM
Old 04-03-2006
RE:backup files older then 24hrs to a new directory .

How do you move (mv) files to a backup directory from a particular directory when the files are
older the 24hrs copied from a batch script run every 24 hrs.
Would you use find or some kind of timestamp.timestamp="$(date +'%m%d%I%M')"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix command/s to find files older than 2 hours in a directory

I need to write a script to find files older than 2 hours in set of direcotries and list them ina mail. I know find command ti list files greater/lesser than days but i need to do it for hours. Any input. (6 Replies)
Discussion started by: Presanna
6 Replies

2. Shell Programming and Scripting

delete files older than 5 minutes in directory (recursively)

sorry guys can some please give me a hint how to achieve this in a slick oneliner? delete files older than 5 minutes in specified directory (recursively) peace (3 Replies)
Discussion started by: scarfake
3 Replies

3. Shell Programming and Scripting

Find files in a directory which are older than 2 hrs

hi all, I need to find files in a directory which are older than N hrs... n can be 1,2,3,.. etc when tried using -mtime option it gives all the files in the last 24hrs from the current time . please help me out on this .. thanks (8 Replies)
Discussion started by: sparks
8 Replies

4. Shell Programming and Scripting

Removing files older than one week in a directory

Hi, I need a shell script to remove the files older than a week in a directoy and if necessary to zip the files. (2 Replies)
Discussion started by: sudhakaryadav
2 Replies

5. Shell Programming and Scripting

Delete the files older than 3 weeks in a particular directory.

Hi, Friends, I am writing a script to delete all the files which are there for more than 3 weeks. I have tried this : find /home/appl/backup -type f -mtime +21 -exec rm -f {} \; But i am not sure if it deletes only the files in specified directory or all the directorinies in the provieded... (3 Replies)
Discussion started by: rajsharma
3 Replies

6. Shell Programming and Scripting

Delete files older than 10 Days in a directory

Hi All I want to remove the files with name like data*.csv from the directory older than 10 days. If there is no files exists to remove older than 10 days, It should not do anything. Thanks Jo (9 Replies)
Discussion started by: rajeshjohney
9 Replies

7. AIX

Want to delete directory, subdirectories and all files which are older than 7 days

how do i remove sub directories of a directory and all files which are older than 7 days by a single command in AIX. pls help me. I am using command as #find /gpfs1/home/vinod/hpc/ -depth -type d -mtime +7 -exec rm -rf {} \; so i want to delete all sub directories and all files from the... (1 Reply)
Discussion started by: vinodkmpal
1 Replies

8. Shell Programming and Scripting

Deleting files and directory's older than 3 months

I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron. I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies

9. Shell Programming and Scripting

How to move the files older than x days with similar directory structure?

Hello, I need to move all the files inside /XYZ (has multi-depth sub directories) that are older than 14 days to/ABC directory but with retaining the SAME directory structure. for example: /XYZ/1/2/3/A/b.txt should be moved as /ABC/1/2/3/A/b.txt I know about find /XYZ -type f -mtime +14... (3 Replies)
Discussion started by: prvnrk
3 Replies

10. Linux

Finding files older than x days within directory with spaces

Hi, I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it. find /files/target directory/*/* -type f -mtime +60 When running the above the usual error message is thrown back + find '/files/target\' 'directory/*/*' -type... (1 Reply)
Discussion started by: Ads89
1 Replies
AMADDCLIENT(8)						  System Administration Commands					    AMADDCLIENT(8)

NAME
amaddclient - program to add client to an existing Amanda configuration SYNOPSIS
amaddclient --config config || --client client name || --diskdev directory to backup [--m] [--dumptype string] [--includefile string] [--includelist string] [--excludefile string] [--excludelist string] [--user string] [--auth string] [--gnutar_list_dir string] [--amandates string] [--no-client-update] [--batch] [--help] DESCRIPTION
After Amanda rpms are successfully installed and amserverconfig is run, amaddclient will add client to the Amanda configuration. amaddclient create or update Amanda disklist(5) file and create or update /var/lib/amanda/.amandahosts file on the server. If --no-client-update is not specified, amaddclient will attempt to update or create /var/lib/amanda/.amandahost, amanda-client.conf and gnutar-lists on the client. (See ssh-keygen(1) and ssh-add(1) for detail.) amaddclient must be run by user amandabackup. --config, --client and --diskdev must be specified. OPTIONS
Options may be abbreviated, as long as the abbreviation is not ambiguous. Option argument can either separated by '=' or a space. Example: --conf=v253, --client client8.zmanda.com --config config Amanda configuration which this program will add the client to. --client client The name of the client machine to add. FQDN name recommended. --diskdev diskdev Directory for this Amanda configuration to backup. --m Modify existing entry in the disklist(5) file. Note: if disklist(5) file has been modified manually, this option might not work. --dumptype dumptype dumptype to use. Dumptype must be defined in /etc/amanda/template.d/dumptypes or /etc/amanda/$config/amanda.conf file. Default: [user-tar] --user string name of user using amrecover on the client, default is root. --auth string authentication method to use when running amrecover from the client , default is bsdtcp. --gnutar_list_dir string directory where gnutar keep its state file on the client. Absolute path required. Default is /var/lib/amanda/gnutar-lists. If --no-client-update is not set, this program will attempt to create the directory on the client. --amandates string file where amanda keep the date of each dumplevel on the client, default is /etc/amandates. --batch Turn on batch mode when copying files to the client, default is off --no-client-update If this option is set, amaddclient will not attempt to update/create .amandahosts, amanda-client.conf and gnutar-lists file on the client. --help Display usage. If any of the following four options are used, amaddclient will extend the dumptype definition to an in-line definition in the disklist(5) file. --includefile string string is a glob expression --includelist string string is a file name on the client containing glob expressions. Specify either --includefile or --includelist. --excludefile string string is a glob expression --excludelist string string is a file name on the client containing glob expressions. Specify either --excludefile or --excludelist. FILES
/var/lib/amanda/template.d Amanda configuration template files install location /var/lib/amanda amandabackup home directory /var/lib/amanda/.amandahosts Amanda authentication file. /var/lib/amanda/gnutar-lists A directory which contains backup timestamp and list of files backed up. /etc/amanda/$config Amanda configuration files location for $config(e.g: DailySet1). /etc/amanda/template.d A directory contains dumptypes and tapetypes files used by all Amanda configurations. /etc/amandates Amanda file on the client. It keeps track of structures of previous dumps. /tmp/amanda directory contains Amanda debug log files. RETURN VALUE
On success, zero is returned. On error, 1 is returned. SEE ALSO
amanda(8), amanda.conf(5), amserverconfig(8), ssh-keygen(1), ssh-add(1), scp(1) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Kevin Till <kevin.till@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.1 02/21/2012 AMADDCLIENT(8)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy