Re: BSD Tar Question
Rakhesh Sasidharan wrote: On Tue, 31 Jul 2007, Garrett Cooper wrote: Rakhesh Sasidharan wrote: On Tue, 31 Jul 2007, Chris Maness wrote: Does BSD tar implementation support splitting the archives? I have a 8G file that I want to burn on DVDs. I used to be able to do this with the linux GNU tar. I don't think so (atleast its not there in the manpages). Maybe you can use the GNU version of tar from archivers/gtar? Regards, Rakhesh Why not use tar -c[j|z]vf - | split ? See split(1) for more info. -Garrett Silly me! I did check the split(1) manpage before posting that, you know. But I guess I didn't read carefully, coz somehow I got the impression it doesn't work on binary files. I checked again now -- you're right. split(1) should do ... Thanks, Rakhesh No prob :). -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BSD Tar Question
Rakhesh Sasidharan wrote: On Tue, 31 Jul 2007, Chris Maness wrote: Does BSD tar implementation support splitting the archives? I have a 8G file that I want to burn on DVDs. I used to be able to do this with the linux GNU tar. I don't think so (atleast its not there in the manpages). Maybe you can use the GNU version of tar from archivers/gtar? Regards, Rakhesh That did it, thanks. Chris Maness ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
BSD Tar Question
Does BSD tar implementation support splitting the archives? I have a 8G file that I want to burn on DVDs. I used to be able to do this with the linux GNU tar. Thanks, Chris Maness ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BSD Tar Question
On Tue, 31 Jul 2007, Chris Maness wrote: Does BSD tar implementation support splitting the archives? I have a 8G file that I want to burn on DVDs. I used to be able to do this with the linux GNU tar. I don't think so (atleast its not there in the manpages). Maybe you can use the GNU version of tar from archivers/gtar? Regards, Rakhesh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BSD Tar Question
Rakhesh Sasidharan wrote: On Tue, 31 Jul 2007, Chris Maness wrote: Does BSD tar implementation support splitting the archives? I have a 8G file that I want to burn on DVDs. I used to be able to do this with the linux GNU tar. I don't think so (atleast its not there in the manpages). Maybe you can use the GNU version of tar from archivers/gtar? Regards, Rakhesh Why not use tar -c[j|z]vf - | split ? See split(1) for more info. -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: incremental tar question
Reed L. O'Brien [EMAIL PROTECTED] writes: FreeBSD 5.2.1 I am using the folowing to backup saturday tar -jcf etc.bz2 /etc /usr/local/etc in /bak/saturday. I would like to do an incremental on monday (et al) in /bak/monday (et al) tar -cf etc.bz2 /etc/ /usr/local/etc/ -g /bak/saturday/etc.bz2 Is this the correct format? I cannot get it to work. I can get it to leave a big enough bz2 file in /bak/monday but I can't untar it. though I can the initial full backup from saturday. Do I need to copy the bz2 archive to /bak/monday? Do I need a different command? Does -g not support bzip2? The parameter to -g is not the backup itself, but a snapshot file that stores information about the previous tar dump. It needs to have been created by that previous backup. For example, you could do something like the following to get a daily incremental backup: tar -cjf backup'+%Y%m%d'.tar.bz2 -g daily-snapshot-file /etc /usr/local/etc I use this mechanism as part of a multiple-level backup system. http://be-well.ilk.org:8088/~lowell/systuff/scripts/systemBackup ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
incremental tar question
FreeBSD 5.2.1 I am using the folowing to backup saturday tar -jcf etc.bz2 /etc /usr/local/etc in /bak/saturday. I would like to do an incremental on monday (et al) in /bak/monday (et al) tar -cf etc.bz2 /etc/ /usr/local/etc/ -g /bak/saturday/etc.bz2 Is this the correct format? I cannot get it to work. I can get it to leave a big enough bz2 file in /bak/monday but I can't untar it. though I can the initial full backup from saturday. Do I need to copy the bz2 archive to /bak/monday? Do I need a different command? Does -g not support bzip2? ideas? FreeBSD 5.2.1 TIA reed ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
tar question...
Hi list, I've googled to search an aswer but no one match mine. I want to tar all files on a directory without include any other directory, I've tried with --exclude but no hope, any suggestion ??? Thanks... ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
On Wednesday 31 December 2003 1:21 pm, Xpression wrote: Hi list, I've googled to search an aswer but no one match mine. I want to tar all files on a directory without include any other directory, I've tried with --exclude but no hope, any suggestion ??? Thanks... I dom something similar to what you ask. What I do is tar a directory and all it's contense EXCEPT one diectory. It goes something like this: tar -zcf name.tgz --exclude MP3 dirname/ Explanation: I'm tarring a dir. and excluding the dir MP3 and it's files. I'm sure you will be able to expand on this. Use man tar to see all the switches. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Best regards, Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
On Wednesday 31 December 2003 13:21, Xpression wrote: Hi list, I've googled to search an aswer but no one match mine. I want to tar all files on a directory without include any other directory, I've tried with --exclude but no hope, any suggestion ??? Thanks... man tar works for me: -n --norecurse Don't recurse into subdirectories when creating. drc -- Dave Cantrell [EMAIL PROTECTED] Lincoln, Nebraska, USA ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
Chris wrote: On Wednesday 31 December 2003 1:21 pm, Xpression wrote: Hi list, I've googled to search an aswer but no one match mine. I want to tar all files on a directory without include any other directory, I've tried with --exclude but no hope, any suggestion ??? Thanks... I dom something similar to what you ask. What I do is tar a directory and all it's contense EXCEPT one diectory. It goes something like this: tar -zcf name.tgz --exclude MP3 dirname/ Explanation: I'm tarring a dir. and excluding the dir MP3 and it's files. I'm sure you will be able to expand on this. Use man tar to see all the switches. Sounds find, but wouldn't $tar /home/foo/* get this job done without including subdirs, since there's no -R involved? I read the OP's question as I want to tar all the files in a directory without including any other directories... which would mean any (sub)directories within the directory would not be placed in the tarball, right? Kevin Kinsey DaleCo, S.P. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
Kevin D. Kinsey, DaleCo, S.P. wrote: Sounds find, but wouldn't $tar /home/foo/* get this job done without including subdirs, since there's no -R involved? -R means show record number. Recursive is the default, -n is no recursive. PWR ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
On Thu, Oct 30, 2003 at 06:57:35AM -0500, Matthew Emmerton typed: Hi list, the question is: can I tar a hole directory without include the tree ??? I mean when I tar all files in a /dir1/dir2/dir3 path, the tar file includes me the path too and I want to tar only the filenames in dir3: I'm using the syntax tar -czf /path/to/store/myfile.tgz /the/path/where/are/the/files, any clue Thanks... cd /the/path/where/are/the/files tar -czf /path/to/store/myfile.tgz . Or in 1 command: tar czf /path/to/store/myfile.tgz -C /the/path/where/are/the/files . cheers Ruben -- Matt Emmerton ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
tar question...
Hi list, the question is: can I tar a hole directory without include the tree ??? I mean when I tar all files in a /dir1/dir2/dir3 path, the tar file includes me the path too and I want to tar only the filenames in dir3: I'm using the syntax tar -czf /path/to/store/myfile.tgz /the/path/where/are/the/files, any clue Thanks... ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tar question...
On Wed, 2003-10-29 at 19:56, Xpression wrote: Hi list, the question is: can I tar a hole directory without include the tree ??? I mean when I tar all files in a /dir1/dir2/dir3 path, the tar file includes me the path too and I want to tar only the filenames in dir3: I'm using the syntax tar -czf /path/to/store/myfile.tgz /the/path/where/are/the/files, any clue Thanks... I'm not 100% sure I understand exactly what you want, so I'm going to be extra careful; I apologize if it sounds like I'm talking down to you. The short answer is to use relative paths: cd to where you want to start, and tar from there. If that doesn't immediately answer your question, read on. Let's say your directory structure looks like this: dir1 dir2 dir3 file1 file2 dir4 file3 You want a tarball that contains 'dir3', 'dir3/file1', 'dir3/file2', 'dir3/dir4', and 'dir3/dir4/file3', right? If so, do this: # cd /dir1/dir2 # tar czf /path/to/store/myfile.tgz dir3 If you instead want a tarball that contains 'file1', 'file2', 'dir4', and 'dir4/file3', instead do this: # cd /dir1/dir2/dir3 # tar czf /path/to/store/myfile.tgz * You can do this all in one command with the -C parameter, but it's easier to remember cd than how -C works (globbing gets more complicated, -C works differently on different platforms/tars, and there's extra stuff to worry about if you use it together with -T). If you only want 'file1' and 'file2', and not 'dir4' or any of its contents, do this (the 'n' means to not recurse into subdirectories): # cd /dir1/dir2/dir3 # tar czfn /path/to/store/myfile.tgz * If you want 'file1' and 'file2' and 'file3' but not 'dir4', there's no simple way to do this. You'll have to do something like this (the 'h' means to dereference symlinks and store the original file they point to): # pushd `mktemp -dt tar` # ln -s `find /dir1/dir2/dir3/` ./ # tar czfh /path/to/store/myfile.tgz * # rm -rf `pwd` # popd This isn't perfect (it won't work if there are too many files, and if any of the original files are symlinks they'll be dereferenced too--and if you plan to do this more than once you'll be better off writing a script that wraps this stuff up), but it should give you an idea. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Tar question
I'm a little confused about the arguments for tar. I want to tar the contents of a directory and save that .tgz file for backup purposes. Problem is, when I copy larry.tgz to /disk2 and: Tar xvfz larry.tgz It creates the /disk2 file structure within /disk2. # cd # ls /disk2 # freebsd larry (directories) # tar cvfz larry.tgz /disk2 # cp larry.tgz /disk2 # cd /disk2 # tar xvfz larry.tgz # ls # freebsd larry disk2 (directories) How can I make tar not create the directory structure within the same directory? Does that make sense? I tried tar cvfzP, no joy. Man tar didn't have anything that jumped out at me, but I could have missed or misunderstood something. If the solution is in the man page, I would appreciate a reference to the section, so I can re-read it to understand. Thanks, Charles ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tar question
On Wed, 3 Sep 2003, Charles Howse wrote: I'm a little confused about the arguments for tar. I want to tar the contents of a directory and save that .tgz file for backup purposes. Problem is, when I copy larry.tgz to /disk2 and: Tar xvfz larry.tgz It creates the /disk2 file structure within /disk2. # cd # ls /disk2 # freebsd larry (directories) # tar cvfz larry.tgz /disk2 # cp larry.tgz /disk2 # cd /disk2 # tar xvfz larry.tgz # ls # freebsd larry disk2 (directories) How can I make tar not create the directory structure within the same directory? Does that make sense? I tried tar cvfzP, no joy. Man tar didn't have anything that jumped out at me, but I could have missed or misunderstood something. If the solution is in the man page, I would appreciate a reference to the section, so I can re-read it to understand. My suggestion is: tar cvCfz /disk2 larry.tgz . tar will cd to /disk2 before interpreting the dot - thus the content of /disk2 will be archived, but without a leading disk2 in the table of contents. Regards Konrad Heuer ([EMAIL PROTECTED]) ___ ___ GWDG / __/__ ___ / _ )/ __/ _ \ Am Fassberg / _// __/ -_) -_) _ |\ \/ // / 37077 Goettingen /_/ /_/ \__/\__//___// Germany ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tar question
On Wednesday 03 September 2003 13:22, Charles Howse wrote: I'm a little confused about the arguments for tar. I want to tar the contents of a directory and save that .tgz file for backup purposes. Problem is, when I copy larry.tgz to /disk2 and: Tar xvfz larry.tgz It creates the /disk2 file structure within /disk2. # cd # ls /disk2 # freebsd larry (directories) # tar cvfz larry.tgz /disk2 # cp larry.tgz /disk2 # cd /disk2 # tar xvfz larry.tgz # ls # freebsd larry disk2 (directories) How can I make tar not create the directory structure within the same directory? Does that make sense? What about : cd /disk2 tar -cvfz larry.tgz * grtz, Daan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Tar question
My suggestion is: tar cvCfz /disk2 larry.tgz . tar will cd to /disk2 before interpreting the dot - thus the content of /disk2 will be archived, but without a leading disk2 in the table of contents. Perfect! I saw the C argument in man tar, but didn't make the connection. Thanks very much! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Tar question
I'm a little confused about the arguments for tar. I want to tar the contents of a directory and save that .tgz file for backup purposes. Problem is, when I copy larry.tgz to /disk2 and: Tar xvfz larry.tgz It creates the /disk2 file structure within /disk2. # cd # ls /disk2 # freebsd larry (directories) # tar cvfz larry.tgz /disk2 # cp larry.tgz /disk2 # cd /disk2 # tar xvfz larry.tgz # ls # freebsd larry disk2 (directories) How can I make tar not create the directory structure within the same directory? Does that make sense? I tried tar cvfzP, no joy. Just cd in to the lowest level of directory structure you want to preserve and do the tar from there. So your example above would morph to: # cd # ls /disk2 # freebsd larry (directories) # cd /disk2 # tar cvfz ../larry.tgz * # # cp ../larry.tgz /disk3 (NOTE: using disk3 for clarity - to avoid the # cd /disk3 issue of replacing copies of the same file) # tar xvfz /larry.tgz # ls # freebsd larry (directories) larry.tgz There are possibly other ways using switches, but this makes most sense. jerry Man tar didn't have anything that jumped out at me, but I could have missed or misunderstood something. If the solution is in the man page, I would appreciate a reference to the section, so I can re-read it to understand. Thanks, Charles ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]