Sponsored Content
Top Forums Shell Programming and Scripting Archive different folders based on their names Post 302457987 by vilibit on Wednesday 29th of September 2010 09:15:42 AM
Old 09-29-2010
Question Archive different folders based on their names

This is my first post so ... be gentleSmilie
Hello I have several folders that are backed up daily in following format:

/back_YY.MM.DD/backup1/*
........................./backup2/*

I looking a script to archive and rename all backup folders bazed on root folder date:

/back_YY.MM.DD/backup1_YYMMDD.tar.gz
........................../backup2_YYMMDD.tar.gz

Thanks in advance.

Last edited by vilibit; 10-04-2010 at 03:27 AM.. Reason: Bad formating
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to archive certain folders in a hierarchy

I'm new to shell scripting and I'm having a tough time figuring out how to script something. Can anyone help? Here is my setup and what I want to do: A directory contains a list of projects by year (2000, 2001, etc) and customers (01-001) all of which have the same internal directory setup... (3 Replies)
Discussion started by: medazinol
3 Replies

2. UNIX for Dummies Questions & Answers

Copying multiple folders to local machine (don't know folder names)

Hi. I'm trying to copy multiple folders from the remote machine to the local machine. I wrote a batch file to run an ftp window. The problem I am having is that the only command to copy files is mget *, and this copies only files, not folders. For example, ftp ts555 cd ts555/test ' test... (5 Replies)
Discussion started by: leenyburger
5 Replies

3. UNIX for Dummies Questions & Answers

How to Archive Folders in T-Shell

Hi i am new to Unix Shell Programming... i m just a beginner and i m training myself in Unix.... I need a sample code to archive folders in my Windows OS using Unix commands... Can someone Help me? (1 Reply)
Discussion started by: aegan
1 Replies

4. Shell Programming and Scripting

Archive files to different target folders based on criteria

Hi All, I am creting archive script in which i need to split the source file's to different target folder's based on the input file name first character. Input1.txt -- will contains file names that are needs to be Archive. Input1.txt A1213355 B2255666 C2254555 A6655444 C5566445 ... (2 Replies)
Discussion started by: kmsekhar
2 Replies

5. Shell Programming and Scripting

Ordering Folders having Date as Names

Hi All, I have directories under /development/arun/weekly/ 20120421 20120414 . . . . I need to arrange these directories in descending order. folder name with recent date will be on top and then others. (1 Reply)
Discussion started by: Arun Mishra
1 Replies

6. OS X (Apple)

Remove leading spaces from file names and folders

Hi All, I have a vexing issue with leading spaces in file names. Basically, we're moving tons of data from our ancient afp file share to Box.com and Box forbids leading spaces in files or folders. The HFS file system seems to be perfectly fine with this, but almost all other Unix file systems... (1 Reply)
Discussion started by: prometheon123
1 Replies

7. Shell Programming and Scripting

Files with same names in different folders

Hello, I am looking for a command line that can do some operations on two files that have the same names but in different folders. for example if folder A contains files 1.txt, 2.txt, 3.txt,.. folder B contains files 1.txt, 2.txt, 3.txt,.. If I would like to concatenate the two files... (6 Replies)
Discussion started by: Mohamed EL Hadi
6 Replies

8. UNIX for Dummies Questions & Answers

Archive folders and sub folders

Hi Can i archive folder and folders in with the tar command My files are located in subfolders Eg: Folder1/Folder1_1/*.pdf Folder1/Folder1_2/*.pdf Folder1/Folder1_3/*.pdf so i would like to tar all the files in Folder1_1 and Folder1_2 only not Folder1_3 that should be done next... (2 Replies)
Discussion started by: cnrj
2 Replies

9. UNIX for Dummies Questions & Answers

Allocating names to folders based on a file

Hi everyone, I have a problem and I would be gratful if you can help. I have set of folders with files in them. e.g. data1, data2, data3 and I have a json file with info ... looking like this I want to rename my files to replace the data with their gender to some processing and back to... (8 Replies)
Discussion started by: A-V
8 Replies
BACKUP_LISTHOSTS(8)					       AFS Command Reference					       BACKUP_LISTHOSTS(8)

NAME
backup_listhosts - Lists Tape Coordinators registered in the Backup Database SYNOPSIS
backup listhosts [-localauth] [-cell <cell name>] [-help] backup listh [-l] [-c <cell name>] [-h] DESCRIPTION
The backup listhosts command displays the Backup Database record of the port offset numbers defined for Tape Coordinator machines. A Tape Coordinator must have an entry in the list to be available for backup operations. The existence of an entry does not necessarily indicate that the Tape Coordinator process (butc) is currently running at that port offset. To check, issue the backup status command. OPTIONS
-localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more details, see backup(8). -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8). -help Prints the online help for this command. All other valid options are ignored. OUTPUT
After a "Tape hosts:" header, the output reports two things about each Tape Coordinator currently defined in the Backup Database: o The hostname of the machine housing the Tape Coordinator. The format of this name depends on the hostname format used when the backup addhost command was issued. o The Tape Coordinator's port offset number. The Tape Coordinators appear in the order in which they were added to the Backup Database. EXAMPLES
The following example shows the result of the command in the ABC Corporation cell: % backup listhosts Tape hosts: Host backup1.abc.com, port offset 0 Host backup1.abc.com, port offset 1 Host backup3.abc.com, port offset 4 Host backup2.abc.com, port offset 3 PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included. SEE ALSO
backup(8), backup_addhost(8), backup_delhost(8), backup_status(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BACKUP_LISTHOSTS(8)
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy