Sponsored Content
Full Discussion: Archiving in Perl
Top Forums Shell Programming and Scripting Archiving in Perl Post 302762727 by itkamaraj on Tuesday 29th of January 2013 02:41:50 AM
Old 01-29-2013
seems your $date variable has \n

do chomp($date); before the tar command

Last edited by itkamaraj; 01-29-2013 at 04:07 AM.. Reason: Correcting the spelling of chomp
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Archiving

I am looking for some advice. I have some files on a Unix server, which contain symbolic links. I need to copy these over to a nfts environment, but wish to keep the symbolic links intact. Any ideas? (7 Replies)
Discussion started by: rmasonuk
7 Replies

2. Shell Programming and Scripting

Archiving

Hi, I want to archive below directory ex: /home/oracle/dd0 sub-directories in dd0 /home/oracle/dd0/backup/backup1 /home/oracle/dd0/backup/backup2 /home/oracle/dd0/dmp ....etc I want a command(tar) which will let me archive the above directory excluding *.dmp(dump files), *.log(log... (1 Reply)
Discussion started by: dreams5617
1 Replies

3. UNIX for Dummies Questions & Answers

Archiving Problem

Hi friends I work on UNIX Operating system and I have many servers. ADM server make archiving for special data every day inside XYZ directory at specific time,the next time SPERADM server will take that archiving data to put them in same directory (inside SPERADM server). Now archiving... (2 Replies)
Discussion started by: bintaleb
2 Replies

4. Shell Programming and Scripting

Archiving by Time

Hi all. I am trying to set up archiving of directories, such that I keep every directory made in the past week, but just one directory per week beyond that. Using the find command, I can easily delete everything more than one week old, but can not figure out how to save one. Each directory... (4 Replies)
Discussion started by: aefskysa
4 Replies

5. UNIX for Advanced & Expert Users

Help with archiving using find

Dear Unix Experts, I am trying to backup some legacy data based on date. I am pasting a small portion from the ls -al command from my session for reference. athena>ls -al ./nmr/exam1d_13C: total 32 drwxrwxrwx 3 root root 4096 May 1 2008 1/ drwxrwxrwx 3 root ... (1 Reply)
Discussion started by: jaison75
1 Replies

6. Shell Programming and Scripting

Simple archiving

Hi, I am a UNIX novice and was trying to write a bash script that would read two parameters, $1 would be the archive file path where the archiving path is passed, so the archiving script will write to this file path. The second parameter will be the directory path to the library which will... (0 Replies)
Discussion started by: pernuntium
0 Replies

7. Shell Programming and Scripting

Help for backup and archiving

Hi, I am trying to develop a KSH script, to perform the following functions: 1. ZIP the previous day backup to ZIP Directory, while removing any ZIP file older than a week. 2. Perform the backup. 3. Send a confirmation mail with subject content of the size of file. Please let me... (0 Replies)
Discussion started by: johnprince1980
0 Replies

8. Shell Programming and Scripting

Archiving the files

hi, Am trying to acrhive a bunch of files on some ftp site and somehow managed to come out with the below logic. I'm getting "syntax error: unexpected end of file" error. Interestingly this below snipeet works fine if run for the first time but the subsequent runs fail! Anybody has any idea... (3 Replies)
Discussion started by: Amee5
3 Replies

9. Shell Programming and Scripting

Logs archiving

Hi , Might be the very basic question and most frequent one also.. wanted to archive the logs/files older than one month or older than 30 days to some particular location. File/log format is like below ABCD_EF_GHIJ_Defaulter_Report_(06-Jun-2014_11-50-20_AM) Source : /test/ABC... (3 Replies)
Discussion started by: Riverstone
3 Replies
ar(5)								File Formats Manual							     ar(5)

Name
       ar - archive (library) file format

Syntax
       #include <ar.h>

Description
       The archive command, combines several files into one.  Archives are used mainly as libraries to be searched by the link-editor,

       A  file	produced  by has a magic string at the start, followed by the constituent files, each preceded by a file header.  The magic number
       and header layout as described in the include file are:
       #define ARMAG  "!<arch>
"
       #define SARMAG 8

       #define ARFMAG "`
"

       struct ar_hdr {
	       char   ar_name[16];
	       char   ar_date[12];
	       char   ar_uid[6];
	       char   ar_gid[6];
	       char   ar_mode[8];
	       char   ar_size[10];
	       char   ar_fmag[2];
       };

       The name is a blank-padded string.  The ar_fmag field contains ARFMAG to help verify the presence of a header.  The other fields are  left-
       adjusted, blank-padded numbers.	They are decimal except for ar_mode, which is octal.  The date is the modification date of the file at the
       time of its insertion into the archive.

       Each file begins on an even (0 mod 2) boundary; a new-line is inserted between files if necessary.  The size given reflects the actual size
       of the file exclusive of padding.

       Provisions are not made for empty areas in an archive file.

       The encoding of the header is portable across machines.	If an archive contains printable files, the archive itself is printable.

Restrictions
       A filename loses trailing blanks.  Most software dealing with archives takes an included blank as a name terminator.

See Also
       ar(1), ld(1), nm(1)

								       RISC								     ar(5)
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy