I want to archive more than 15 days old files from /var/spool/ directory which contains 67 folders.
I have done a script for a single folder which is as follows :
Now I need to do same process for remaining 66 folders, involves creating same stanza 66 times.
Is there any way to short this process ?
Hi all. New to unix and need a little help. I am trying to create a script to archive files or directories in to a tarball. I've played a little with scripts but dont understand how to do options. What i want to be able to do is give the command any number of inputs and an output.
ex.... (2 Replies)
Im trying to create a script to archive specified directories into a specified tarball backup file. This is what i want the input to look like
ex. save -i '/bin/b*' -i '/bin/ls' -o backup
this is what i have
#!/bin/bash
#save - backup file script
unset myInput
unset myOutput
while... (3 Replies)
Hello
Take a look at following lines.
This is giving me an o/p all in one array where as i want the column to be printed.How can i do it?
e.g
I am getting:
1575028616......
whereas i want
1
5750
28616
I am writing this small piece and trying to get this column o/p in a CSV.
... (1 Reply)
I have an nfs mount /logfile/project mounted on several of my application server machines. I have 5 jvms running on each machine and I have several machines. the jvms logs are created and rotated every day so it will look like
/jvm1/logs/server.log.2010-10-27
/jvm2/logs/server.log.2010-10-27... (3 Replies)
I have a directory that need to backup, its size is about 150GB consist of multiple files and directories. I try to compress it become a single archive file using these commands:
tar cjf this_archive.tar.bz2 this_archive/
or
tar cf - this_archive/ | 7z a -si -t7z -m0=lzma -mx=9 -mfb=64... (3 Replies)
Hi,
I have a log file that gets updated every second. Currently the size has grown to 20+ GB. I need to have a command/script, that will try to get the actual size of the file and will remove 50% of the data that are in the log file. I don't mind removing the data as the size has grown to huge... (8 Replies)
Dear Team,
I am looking for transferring files to and from the local and remote servers using SFTP commands. Currently the script is using the mget and mput commands to do the copying of the files. While I am trying to move the files from local to remote server, I would also like to archive... (21 Replies)
We have the data looks like below in a log file.
I want to generat files based on the string between two hash(#) symbol like below
Source:
#ext1#test1.tale2 drop
#ext1#test11.tale21 drop
#ext1#test123.tale21 drop
#ext2#test1.tale21 drop
#ext2#test12.tale21 drop
#ext3#test11.tale21 drop... (5 Replies)