02-07-2020
So can I keep the original command for creating the tar and use the “cd” for the extraction? The problem with using full path is it is homework and when tested by instructor it is run in his environment and and not sure if they have same directories. May be home/instructor and not home/student...
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Hi,
ich just uploaded a file to the forum and found that the tar.gz extension for files is not allowed... i renamend the file to *.zip but tar.gz is a common format in the unix world. is it possible to change that?
tia,
DN2 (2 Replies)
Discussion started by: DukeNuke2
2 Replies
2. Shell Programming and Scripting
hi guys..
Since am a bit new to shell scripting, can anyone help me with this problem please.. i've been struggling with it since 2 days. :(
I have a directory lets say myFolder and within it I have sub directories let say myFolder1.tar, myFolder2, myFolder3, etc. I need to write a shell... (12 Replies)
Discussion started by: kanexxx
12 Replies
3. Shell Programming and Scripting
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies
4. Shell Programming and Scripting
I've been able to find all the extensionless files named photos using the command:
find /usr/local/apache/htdocs -name photos -print0
I need to copy those files to the name photos.php in their same directory.
I've found a bunch of xarg examples for moving to other directories but I wasn't... (7 Replies)
Discussion started by: dheian
7 Replies
5. UNIX for Advanced & Expert Users
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (4 Replies)
Discussion started by: fld2007
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
i have 2 directory of files, the first directory(ext1directory) contain files of extension .ext1 and the second directory(allextdirectory) contains files of multiple extensions (.ext1,.ext2,.ext3,..)
so i want to copy the files from directory 2(allextdirectory) that have the same name... (8 Replies)
Discussion started by: shelladdict
8 Replies
7. Shell Programming and Scripting
What's the command syntax for stripping out the tar.gz file extension in a bash command line (not script file). Thanks!
prompt/> ls *.tar.gz | <what comes here?> (3 Replies)
Discussion started by: ZillaG
3 Replies
8. Shell Programming and Scripting
Hi,
I have a directory which I am passing in my script as a parameter. Parameter name has been set to $TCH_FILE_DIRECTORY.
I want to know if there's atleast 1 (or more) files in this directory with the extension '.tch'. How can I find this using ksh. (4 Replies)
Discussion started by: Bhavesh Sharma
4 Replies
9. AIX
Quick question,
is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?)
sample:
/opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz
will the tar file backup.tgz also include backup.tgz ?
i tried... (5 Replies)
Discussion started by: filosophizer
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have an inquiry on how do I use the find command in Solaris Unix to find some file ends with extension : txt, err in the root directory with modified date of 30days and this find command will also need to exclude b directory and its subdirectory. All the files from the above find criteria... (5 Replies)
Discussion started by: snowfrost88
5 Replies
LEARN ABOUT DEBIAN
rdup-tr
RDUP-TR(1) rdup RDUP-TR(1)
NAME
rdup-tr - transform rdup output
SYNOPSIS
rdup-tr [OPTION]...
DESCRIPTION
Transform rdup output into something else. Where something else can be a tar, cpio, pax archive or another rdup stream.
The rdup archive must be given on rdup-tr's standard input.
You can select multiple types of output (-O flag), but you must be aware that you may loose some information in formats other than rdup's
own, see the table below.
You may also supply rdup-tr with only a list of pathnames, this can be selected with the -L flag.
The following table shows what happens with the output depending on the input.
0 OK
D delete information is lost
H hardlink information is lost
| |
output | tar,cpio,pax | rdup
input | |
------------- | ------------- | ------
rdup | D | 0
filelist | DH | H
| |
OPTIONS
-L Select list input format. Normally rdup-tr accepts rdup output, with this option you can give it a list of path names. Note: with
list input rdup-tr will `stat()` each file.
-O Output format. This can be 'tar', 'cpio', 'pax' or 'rdup'. It defaults to 'rdup'.
-X key Read the encryption key from the file key and encrypt all paths with Blowfish and this key and iv. After the encryption the binary
data is converted into ASCII using an URL safe (Section 4 of RFC 3548) version of base64 encode.
The encryption key must be on the first line and the key size must be 16 and 8 bytes for the iv, so 24 in total.
-Y key Read the decryption key from the file key and decrypt all paths with Blowfish and this key. Before the encryption the paths are con-
verted to binary by using an URL safe version of base64 decode.
-c Force output to the tty. Normally rdup-tr wants to see it's output redirected.
-v Be more verbose.
-V Print rdup-tr's version.
-h A short help.
EXAMPLES
The following is possible
rdup -Pgzip -Pmcrypt,-f,KEY,-c /dev/null /home |
rdup-tr -O tar -X<(echo secret) | gzip >
my-home-zipped-crypted-pathcrypted-tar.gz
That is: all files under /home are gzipped and encrypted on a per file basis (first line). Further more, all pathnames are Blowfish
encrypted (second line) with the key 'secret'. This is put in a tar file, which is then compressed, resulting in the final output (final
line).
Creating a compressed and encrypted tar archive out of a full rdup dump might be done as follows
rdup -Pgzip -Pmcrypt,-f,KEY,-c /dev/null /home |
rdup-tr -O tar > my-home-zipped-and-crypted.tar
Or even pack and unpack it on the fly
rdup -Pgzip -Pmcrypt,-fKEY,-c /dev/null /home | rdup-tr -Otar |
ssh user@remotehost tar xvCf /tmp -
Or encryption with openssl
rdup -Popenssl,enc,-e,-des-cbc,-k,secret /dev/null /home
Or, compressing with gzip, encrypting with openssl and then compressing the entire archive yet again
rdup -Pgzip -Popenssl,enc,-e,-des-cbc,-k,secret /dev/null /home |
gzip > my_compressed_encrypted_rdup_archive.gz
Recreating the original rdup output, which can be fed to rdup-up.
gunzip -c my_compressed_encrypted_rdup_archive.gz |
rdup-tr -Popenssl,enc,-d,-des-cbc,-k,secret -Pgzip,-d >
my_rdup_archive
rdup-up < my_rdup_archive -t /tmp/restore
Notice the reversal of the -P options.
EXIT CODE
rdup-tr return a zero exit code on success, otherwise 1 is returned.
AUTHOR
Written by Miek Gieben.
REPORTING BUGS
Report bugs to <miek@miek.nl>.
SEE ALSO
http:/www.miek.nl/projects/rdup/ is the main site of rdup. Also see rdup(1), rdup-up(1) and rdup-backups(7).
COPYRIGHT
Copyright (C) 2005-2010 Miek Gieben. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Licensed under the GPL version 3. See the file LICENSE in the source distribution of rdup.
1.1.11 27 Nov 2008 RDUP-TR(1)