09-02-2009
tar -cvfX test.tar bin/ --exclude bin/perl
its not working.
Please provide me the syntax of it
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
my first question is how to zip the entire directory contents.
second question is can we unzip the same file through windows environment.
please help i need to complete it by EOD (3 Replies)
Discussion started by: bbc17484
3 Replies
2. 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
3. UNIX for Dummies Questions & Answers
I m new to unix and trying to use tar command with -C option -
tar -cf /tmp/Test_shell/ZipTestFolder/archive10.tar -C /tmp/Test_shell/ZipTestFolder/ .
It creates one more folder no_name inside the tar file. any suggestions how to remove it. I m using aix 5.3 (8 Replies)
Discussion started by: abhishek1.618
8 Replies
4. 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
5. AIX
I am trying to restore a specific directory and all sub-directories therein using a rootvg tape. I am using the following command to make the backup:
mksysb -m -i -v /dev/rmt0
However, I am getting the following result:
tctl status
rmt0 Available 04-08-00-0,0 LVD SCSI 4mm Tape Drive... (10 Replies)
Discussion started by: herot
10 Replies
6. UNIX for Dummies Questions & Answers
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Discussion started by: vivien_chu
1 Replies
7. Shell Programming and Scripting
Hello,
I`m a complete newbie to coding, please help with this problem.
I have multiple files in a directory, I have to loop through the contents of each file and extract number of unique isoforms in that file. Each file is tab delimited and only the line with the first parent (column 3)... (1 Reply)
Discussion started by: ritakadm
1 Replies
8. UNIX for Dummies Questions & Answers
I am looking to write a script that will read the php.ini files on my web host. If the two lines do exist do nothing. If not append two lines to the end of it then move on to the next directory and open the next php.ini file.
I have the beginning of one that was given to me on another web site but... (6 Replies)
Discussion started by: Larrykh465
6 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
How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on:
$ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print
it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
LEARN ABOUT OPENSOLARIS
chroot
chroot(1M) System Administration Commands chroot(1M)
NAME
chroot - change root directory for a command
SYNOPSIS
/usr/sbin/chroot newroot command
DESCRIPTION
The chroot utility causes command to be executed relative to newroot. The meaning of any initial slashes (/) in the path names is changed
to newroot for command and any of its child processes. Upon execution, the initial working directory is newroot.
Notice that redirecting the output of command to a file,
chroot newroot command >x
will create the file x relative to the original root of command, not the new one.
The new root path name is always relative to the current root. Even if a chroot is currently in effect, the newroot argument is relative to
the current root of the running process.
This command can be run only by the super-user.
RETURN VALUES
The exit status of chroot is the return value of command.
EXAMPLES
Example 1 Using the chroot Utility
The chroot utility provides an easy way to extract tar files (see tar(1)) written with absolute filenames to a different location. It is
necessary to copy the shared libraries used by tar (see ldd(1)) to the newroot filesystem.
example# mkdir /tmp/lib; cd /lib
example# cp ld.so.1 libc.so.1 libcmd.so.1 libdl.so.1
libsec.so.1 /tmp/lib
example# cp /usr/bin/tar /tmp
example# dd if=/dev/rmt/0 | chroot /tmp tar xvf -
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
cd(1), tar(1), chroot(2), ttyname(3C), attributes(5)
NOTES
Exercise extreme caution when referencing device files in the new root file system.
References by routines such as ttyname(3C) to stdin, stdout, and stderr will find that the device associated with the file descriptor is
unknown after chroot is run.
SunOS 5.11 15 Dec 2003 chroot(1M)