01-08-2009
shell scripting with directory
Jerry
This is what I need as part of a automated shell script .
I have a database backup script called eod.sh which backups the database and puts the directory named fullDB_timestamp to directory /ndata/nmk/backup.Its a cron job and creates the directory every midnight.
What I want is to have 4 diff copies of fullDB_timestamp i.e to have 4 consecutive days of backups under /nsdata/nmk .ie copy each days fullDB** under /ndata/nmk/backup to /nsdata/nmk/copy1-4 .On the fifth day it should overwrite the first and so on .
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
2. Shell Programming and Scripting
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies
3. What is on Your Mind?
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies
4. What is on Your Mind?
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies
5. Web Development
i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
6. Shell Programming and Scripting
I have a directory /java/unix/data
In data directory i have so many files from which i want to find some files who look alike below.(there are number of such below such files as well different files too in the data directory)
-68395#svg.xml
-56789#ghi.xml
-67894#gjk.org
-56734#gil.txt
I... (6 Replies)
Discussion started by: pratima.kumari
6 Replies
7. UNIX for Dummies Questions & Answers
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
8. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
9. Shell Programming and Scripting
Hi,
The requirement is below:
There are 5 files in a unix directory and i need to pick up latest file from the directory that i can do like this ls -lrt | tail -1 and this file can be processed. now the actual requirement is some times what will happen the second third...on files i.e(ls -lrt... (4 Replies)
Discussion started by: prawinmca
4 Replies
10. Shell Programming and Scripting
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies
LEARN ABOUT DEBIAN
filetraq
FILETRAQ(8) System Manager's Manual FILETRAQ(8)
NAME
filetraq - keep track of changes in config files.
SYNOPSIS
filetraq --help
filetraq [filelist] [backupdir]
DESCRIPTION
This manual page documents briefly the filetraq command. This manual page was written for the Debian GNU/Linux distribution because the
original program does not have a manual page.
FileTraq is a shell script that reads a list of files to watch, runs diff against each file and its backup, and reports any discrepancies,
along with keeping a dated backup of the original.
It's designed to be run as a cron job.
OPTIONS
This command has two possible invocations, one with one option:
--help Show summary of options and the default values of the config file and the backup directory.
and other with no options, a config file or a config file and the backupdir.
The debian version has been modified to read the /etc/default/filetraq configuration file, that lets the administrator change the default
values of the config file ( file ), the backup directory ( backupdir ), the diff options used to print the filetraq output ( diffopts ,
e.g. -p -C 1 or -u ) and the diff order ( difforder , either newold (FileTraq default) or oldnew (traditional Unix default)).
SECURITY
FileTraq is not well tested or hardened. It runs as root, but all of its config files should only be accessible by root. No security
holes are known at this time, but please be careful.
BUGS
Right now, it doesn't take care of its backups very well. The dated backups will accumulate in the backups directory, bounded only by
diskspace.
It only handles text files, it isn't a Tripwire replacement for use with system binaries.
FILES
/etc/filetraq.conf
/etc/default/filetraq
/var/lib/filetraq
SEE ALSO
diff(1), cron(8).
AUTHOR
Jeremy Weatherford <xidus@xidus.net>
Homepage: http://filetraq.xidus.net/
This manual page was written by Sergio Talens-Oliag <sto@debian.org>, for the Debian GNU/Linux system (but may be used by others).
June 2001 FILETRAQ(8)