07-24-2008
It works perfectly...Thanks a lot for your help....
Would like to know if there is a way to see if the check if the directories ARCHIVE/archive/Archive exists and based on that move the files to the Archive directory...since I want to write a generic script that archives the files to archive directory...but for some projects the archive directory is ARCHIVE, for some it is Archive and for others it is Archive.
Once agian thanks for all the help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am writing a shell script for Archive Purge for the table having rows < 1 year. The shell script has to extract the rows from the table and write those extracted rows to a text file. Then from the text file, each rows will be read and deleted by means of delete query one by one. The fields will... (5 Replies)
Discussion started by: regnumber
5 Replies
2. Shell Programming and Scripting
Hi All,
OS:AIX 5.3 64 bits
I would like the below script to send alert mail with the message - "Standby logs falling behind Primary" to xyz@yahoo.com
Script
=====
#!/usr/bin/ksh
#-----------------------------------------------------------------------------
# Use SQL*Plus to query... (1 Reply)
Discussion started by: a1_win
1 Replies
3. Shell Programming and Scripting
Hello, I found the forum’s information very helpful and informative. I am relatively new to UNIX programming. I am researching how to write a UNIX shell script to ftp all files from specific host folder to a client server. Also need to archive all transferred files, send a message (email) if any... (4 Replies)
Discussion started by: Lenora2009
4 Replies
4. Shell Programming and Scripting
Hi,
I'm new to Unix shell scripting and my first task is proving to be tricky.
Please help where you can with pointers, tips, or examples of script.
I'm self learning from the internet.
I need to archive off files to another write protected directory according to the file names.
ex.... (0 Replies)
Discussion started by: gorses
0 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a "Source" folder which may contain some files. I need a shell script which should move all files which are older than 3 days to "Archive" folder.
Thanks in Advance... (4 Replies)
Discussion started by: phani333
4 Replies
6. Shell Programming and Scripting
Hi all,
I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns.
We intend to have a manually updateable SuperSetCols.csv which would look like
"ColA","ColB","ColC","ColD","ColE","ColF","ColG"
so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies
7. Shell Programming and Scripting
Hello All,
I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60%
Need to identify the unique file system that reaches threshold value.
ex:
capacity
... (4 Replies)
Discussion started by: sasikanthdba
4 Replies
8. Shell Programming and Scripting
Hi All,
Good morning...
I have prepared a shell script which will monitor files in a certain folder and if available, SCP it to a destination path.
Now the challenge I'm facing is my script is currently SCP-ing to only a single destination path. Wherever different destination path is in... (1 Reply)
Discussion started by: saps19
1 Replies
9. Shell Programming and Scripting
Requirement:
Under fuse application we have placeholders called containers;
Every container has their logs under:
<container1>/data/log/fuse.log
<container1>/data/log/fuse.log.1
<container1>/data/log/fuse.log.XX
<container2>/data/log/fuse.log... (6 Replies)
Discussion started by: Arjun Goswami
6 Replies
10. UNIX for Beginners Questions & Answers
All,
I am trying to create a report on the duration of an ETL load from the file arrival to the final dump in to a database for SLA's.
Does anyone have any guidance or ideas on how metadata can be extracted; information of a file: like file name, created timestamp, count of records and load... (1 Reply)
Discussion started by: pradeepp
1 Replies
ar(4) Kernel Interfaces Manual ar(4)
NAME
ar - Archive (library) file format
SYNOPSIS
#include <ar.h>
DESCRIPTION
The archive command (ar) combines several files into one. Archives are used mainly as libraries to be searched by the link-editor ld.
A file produced by ar 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:
COMMON ARCHIVE FORMAT
ARCHIVE File Organization: _______________________________________________ |__________ARCHIVE_MAGIC_STRING_______________| |__________AR-
CHIVE_FILE_MEMBER_1______________| | | | Archive File Header "ar_hdr" |
|.............................................| | Member Contents | | 1. External symbol directory
| | 2. Text file | |_____________________________________________| |________ARCHIVE_FILE_MEM-
BER_2________________| | "ar_hdr" | |.............................................| | Member Con-
tents (.o or text file) | |_____________________________________________| | . . . | | .
. . | | . . . | |_____________________________________________| |________AR-
CHIVE_FILE_MEMBER_n________________| | "ar_hdr" | |.............................................| |
Member Contents | |_____________________________________________|
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. Nevertheless the size given reflects
the actual size of the file exclusive of padding.
There is no provision 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
File names lose trailing blanks. Most software dealing with archives takes even an included blank as a name terminator.
RELATED INFORMATION
ar(1), ld(1), nm(1) delim off
ar(4)