P. 1
Linux 101 Hacks

Linux 101 Hacks

|Views: 299|Likes:
Published by docphongm41
tips about linux commands
tips about linux commands

More info:

Published by: docphongm41 on Jun 01, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/01/2012

pdf

text

original

Pass the option –P to the zip command to assign a password to the zip
file.

# zip -P mysecurepwd var-log-protected.zip /var/log/*

The above option is good if you are using the command inside a shell-
script for background jobs. However, when you are performing the
compression interactively on the command-line, you don’t want the
password to be visible in the history. So, use the option –e as shown
below to assign the password.

# zip -e var-log-protected.zip /var/log/*
Enter password:
Verify password:
updating: var/log/acpid (deflated 81%)
updating: var/log/anaconda.log (deflated 79%)

When you are uncompressing a password protected file, it will ask for
the password as shown below.

# unzip var-log-protected.zip
Archive: var-log-protected.zip
[var-log-protected.zip] var/log/acpid password:

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->