LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2012, 04:36 PM   #1
ryankirk
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
Encrypting


Hi, I need to create a script named archivator.sh, which receives two parameters: a file with the extension tar.gz (archive) and a folder. The script must archive the files from the folder into the archive received as parameter (without the folder itself and without compressing the files). The archive will be then encrypted (using the aes algorithm) with the encrypting password ryan.

Any help is appreciated. Thanx.

Last edited by ryankirk; 11-30-2012 at 04:39 PM.
 
Old 11-30-2012, 06:37 PM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Welcome to LQ!

Start writing the script ... looks like a homework question.
 
Old 11-30-2012, 08:13 PM   #3
dru8274
Member
 
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 37
You can tar, gzip, and encrypt the contents of the current directory with...
Code:
tar -czp * | gpg --compress-algo uncompressed --cipher-algo AES256 --passphrase "ryan" --output ../backup.tgz.gpg --symmetric -
after which the data can be extracted with...
Code:
gpg --decrypt ../backup.tgz.gpg | tar -xz
And that is only one way of many. I know it isn't all you asked for, but I hope it helps you with writing the rest of your script.

Happy with ur solution... then tick "yes" and mark as Solved!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypting tariq07 Linux - Security 1 03-13-2007 02:35 AM
Encrypting an entire CD binarybob0001 Linux - General 0 03-26-2006 05:30 PM
Encrypting an Existing FS with 'dd' ta0kira Linux - Security 2 01-24-2006 02:35 PM
Encrypting filesystem ImpactDNI Linux - Security 3 03-26-2005 11:53 AM
encrypting im1crazyassmofo Linux - General 1 04-20-2003 10:15 PM


All times are GMT -5. The time now is 07:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration