Hi, I would like to know how to go about writing a script to compress & deleate old files from /var/mqm/log file system.
I am a complete beginner and would love it if someone could actually give me the code for this.
Thank you. (4 Replies)
Hi
Is there any comand where in which we can check the time stamp of the sub folder created in one main folder and delete all the other subfolder which have been created one week before the actual time (current time )
or even 15 days before the current time
Thanks in advance (1 Reply)
hi,
I've a folder structure like :
/home/project/LIBNAMEA/FILE1
/home/project/LIBNAMED/FILE2
/home/project/LIBNAMEC/FILE3
/home/project/LIBNAMED/FILE4
/home/project/LIBNAMEX/FILE5
(there is no relation in the letters after the project/ )
and i need to delete the files keeping... (5 Replies)
Hi all,
I amd new in UNIX programming. I have a query.
I need to delete some files (like .dec files) from some folders. I have a list of folders. What will be command for it.
Please help me.
Thanks in Advance. (3 Replies)
Dear all,
i use incremental backup my data with .zip to my hard drive. what i need is i don't want the old .zip file older than 30 days. how to write a shell script automatically remove my external hard disc zip backup folders older than 30 days?
Regards, (2 Replies)
Hi all,
Someone please help with a script that will compress a directory for backed up:
home/main/directory2Bcompressed/
home/main/directory2Bcompressed_date.zip
Then all the files in the directory are to be deleted right afterwards, emptied out for new files to come in:
... (6 Replies)
Hi All,
I need a solution for the following scenario.
I am the owner for the particular folder and I have given 777 permissions for some specific reasons. So others can able to create folders and files.
But when I am done with the work, I need to delete the folders which are created by... (4 Replies)
I have an amount of folders and I want to delete only the empty ones. But I have more than 200 empty folders, so I would preffer do not delete one by one... I know it is possible, but I don't know how. I've tried with the size, using 'du' command, and saving the result in a file. After that, I made... (3 Replies)
hello everyone.
in /opt/abc every night there is a new folder created. in that folder there is aseries of files created for that day.
i would like to run a script every Sunday night at 02:00 to compress each file separately (preserving its name) who is older than 2 days.
i have found this... (2 Replies)
Hello Guys,
Can you please help me with a script which zips the older log files(1-2 weeks) and delete them?
I want to run the script manually instead of setting it up in a cron job.
Appreciate your help.
Regards,
Kris (6 Replies)
Discussion started by: kriss.gv
6 Replies
LEARN ABOUT DEBIAN
ns_zlib
ns_zlib(3aolserver) AOLserver Zlib Extension ns_zlib(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_zlib - Zlib compression support
SYNOPSIS
ns_zlib compress string
ns_zlib gunzip file
ns_zlib gzip string
ns_zlib gzipfile file
ns_zlib uncompress string
_________________________________________________________________DESCRIPTION
The ns_zlib command enables compressing and uncompressing of strings or files. The command is available if the nszlib.so module is loaded
into AOLserver or the libnszlib.so, nszlib.dll, or libnszlib.dylib dynamic library is loaded using the load command in a suitable tclsh
such as nstclsh.
ns_zlib compress string
This command compresses the given string and returns a Tcl byte array object with the compressed data.
ns_zlib gunzip file
This command uncompresses the contents of the given gzipped file and returns a string as the result.
ns_zlib gzipfile file
This command is similar to the gzip shell routines, compressing the given file into a new file with the .gz extension. If success-
ful, the original uncompressed file is deleted.
ns_zlib uncompress bytearray
This command takes a byte array object which includes compressed data and returns an uncompressed string object.
EXAMPLES
The following examples demonstrate compressing and uncompressing a string;
# Compress Tcl string
set test "This is test string"
set data [ns_zlib compress $test]
set test [ns_zlib uncompress $data]
--> returns "This is test string"
# Compress the string into gzip format
set gzip [ns_zlib gzip $test]
# Save as gzip file
set fd [open /tmp/test.gz w]
fconfigure $fd -translation binary -encoding binary
puts -nonewline $fd $gzip
close $fd
# Uncompress gzipped file
set test [ns_zlib gunzip /tmp/test.gz]
--> returns "This is test string"
SEE ALSO
ns_adp_ctl(n), load(n)
KEYWORDS
GZIP, compress, uncompress
AOLserver 4.5 ns_zlib(3aolserver)