Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
TAR command
Results 1 to 3 of 3

Thread: TAR command

Hybrid View

  1. #1

    TAR command

    I have a minor question. I am learning some shell scripting, and wrote a little thing to back up some directories as TAR archives. Let's say I want to back up /home/ron/crap/ (so I really only want the 'crap' directory backed up) for some reason, when I untar the archive, it does the whole tree, starting at /home/. Any ideas? Oh, the script uses 'tar -cvjf'.
    Asus A8V Deluxe Mobo
    AMD Athlon64 X2 4400 -939
    2GB Crucial DDR3200 Dual-Channel
    ATi AiW 9800 Pro 128DDR
    Audigy2 ZS
    Sony DRU-810 DVD+RW DL
    3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 120Gb 16Mb Cache

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    304

    Re:TAR command

    Rather than have your script "tar cvfj /home/ron/crap/" have the script do this:
    cd /home/ron/ && tar cvfj ./crap/

  3. #3

    Re:TAR command

    That's nice ;D It never even occurred to me to do it that way. Thanks!
    Asus A8V Deluxe Mobo
    AMD Athlon64 X2 4400 -939
    2GB Crucial DDR3200 Dual-Channel
    ATi AiW 9800 Pro 128DDR
    Audigy2 ZS
    Sony DRU-810 DVD+RW DL
    3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 120Gb 16Mb Cache

Similar Threads

  1. Use of yum command
    By suresh_infoguy in forum Linux - General Topics
    Replies: 2
    Last Post: 03-09-2007, 12:10 AM
  2. the 'dd' command...
    By nusjunkie in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 06-11-2002, 07:01 AM
  3. Help with a command?
    By Rastar in forum Linux - General Topics
    Replies: 4
    Last Post: 05-11-2002, 12:09 AM
  4. What is the command? Or App?
    By TomP in forum Linux - General Topics
    Replies: 10
    Last Post: 02-26-2002, 07:36 PM
  5. Looking for Command
    By jmbrinks in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 02-25-2002, 09:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •