I admit I am terrible with scripting, so when I was asked to store users' command history lines and zip them on monthly basis what I did was to create a file "user_history_Feb" with the following contents:
Part A
and a cronjob for it to run end of Feb:
Part B
I am using RHEL 5.7
I know my "script" is no script, and would be very thankful if someone could help me into scriptifying part A so I can adjust the cron
Hello all, I'm new to shell scripting and want to make a script that I can write to log the users logging on and off the a unix system.
I have had a good look over the past few days to crack it, I think I am getting close.
I want a script that runs an infinite loop to check every 5 seconds... (14 Replies)
help trying to figure out a batch shell script to zip each file in a directory into its own zip file
using this code but it does not work
tryed this also
nothing seems to work , just ends without zipping any files
i have over 3000 files i need to zip up individualy
... (7 Replies)
Hi Guru's,
I have to write a shell script which groups file names based upon the certain matching string pattern, then creates the Tar file for that particular group of files and then zips the Tar file created for the respective group of files.
For example, In the given directory these files... (3 Replies)
Hi, I'm trying to zip up the first half year's application logs into one zip file. The logs are in the format of log.2011-01-01 to log.2011-06-30.
I tried to use this command at ksh:
zip logs.jan-jun2011.zip *2011-01* *2011-02* *2011-03* *2011-04* *2011-05* *2011-06* It works.
However, I... (4 Replies)
hello frnds,
im using a script to stop, reset and to start the siebel server..
i'm able to extract the enterprise name, siebel server name and siebel root path..
when i try to use these info in the script im unable to perform the reset_server -r <siebel root> -e <enterprise name> +-M... (3 Replies)
Hi Expert,
We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one... (3 Replies)
I have files in a Linux directory . Some of the file is listed below
-rw-rw-r--. 1 roots roots 0 Dec 23 02:17 zzz_123_00000_A_1.csv
-rw-rw-r--. 1 roots roots 0 Dec 23 02:18 zzz_121_00000_A_2.csv
-rw-rw-r--. 1 roots roots 0 Dec 23 02:18 zzz_124_00000_A_3.csv
drwxrwxr-x. 2 roots roots 6 Dec 23... (4 Replies)
Discussion started by: Balraj
4 Replies
LEARN ABOUT CENTOS
zip_set_default_password
ZIP_SET_DEFAULT_PASSWORD(3) Library Functions Manual ZIP_SET_DEFAULT_PASSWORD(3)NAME
zip_set_default_password - set default password for encrypted files in zip
LIBRARY
libzip (-lzip)
SYNOPSIS
#include <zip.h>
int zip_set_default_password(struct zip *archive, const char *password);
DESCRIPTION
The zip_set_default_password function sets the default password used when accessing encrypted files. If password is NULL, the default
password is unset.
If you prefer a different password for single files, use zip_fopen_encrypted(3) instead of zip_fopen(3). Usually, however, the same pass-
word is used for every file in an zip archive.
RETURN VALUES
Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in archive is set to indicate the error.
ERRORS
zip_set_default_password fails if:
[ZIP_ER_MEMORY]
Required memory could not be allocated.
SEE ALSO libzip(3), zip_fopen(3), zip_fopen_encrypted(3)AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
NiH January 3, 2011 ZIP_SET_DEFAULT_PASSWORD(3)