Results 1 to 6 of 6

Thread: Extracting Issue

  1. #1
    Member
    Join Date
    Apr 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Exclamation Extracting Issue

    Hi All,

    My script is to copy a .tar file through 2 networks.
    im using two Linux machines to do this,

    My question is i have copied a .tar file to network and i have to extract it, so how can i change the directory to the copied network form the source network ,

    need a help to understand this case ?

    Thanks
    Mohamed Inshaf

  2. #2
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    485
    Thanks
    10
    Thanked 49 Times in 46 Posts
    Rep Power
    8

    Default

    Hi,
    can you explain more, i am not understood what you want to achieve.
    You need to use absolute path during the copy.
    Rahul Patil <http://www.linuxian.com>

  3. #3
    Member
    Join Date
    Apr 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hey,
    this is the case, i have two Linux machines will name that as Linux01 and Linux02,
    im copying a .tar file from Linux 01 to Linux02 - /home/test/copy/ directory and i have successfully coped that, now i want to extract the .tar file in Linux02 /home/test/copy/ directory so i need the command for that,
    but still remember im in Linux01 machine and my shell script running from LInux01

    can u help me on this case

    Thanks
    Mohamed Inshaf

  4. #4
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    485
    Thanks
    10
    Thanked 49 Times in 46 Posts
    Rep Power
    8

    Default

    You can use -C flag in tar command
    eg.
    HTML Code:
    tar -xjf foo.tar.bz2 -C bar/
    extract bzipped foo.tar.bz2 after changing directory to bar
    Rahul Patil <http://www.linuxian.com>

  5. #5
    Member
    Join Date
    Apr 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hey,
    I used your code but its got error.
    my code is
    tar -xjf project.tar -C /home/test/copy/

    can u please explain me whats the error ?

    Thanks
    Mohamed Inshaf

  6. #6
    Senior Member Rahul.Patil's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai india
    Posts
    485
    Thanks
    10
    Thanked 49 Times in 46 Posts
    Rep Power
    8

    Default

    use only -xf, do not use -j its for bzip2

    use following command to get more information
    man tar
    Last edited by Rahul.Patil; 18th May 2012 at 04:49 PM.
    Rahul Patil <http://www.linuxian.com>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. LVM-Extracting a part of volume from volume group.
    By Ranjith in forum Linux software
    Replies: 1
    Last Post: 3rd March 2012, 10:22 AM
  2. VPN Issue
    By ibakes in forum Networking, Firewalls and Security
    Replies: 1
    Last Post: 18th January 2011, 08:30 PM
  3. PHP 5 issue
    By tanweernoor in forum Coding in General
    Replies: 6
    Last Post: 14th November 2008, 10:03 AM
  4. Extracting iso In linux
    By raj in forum Linux software
    Replies: 1
    Last Post: 20th August 2008, 07:41 PM
  5. Log Off Issue
    By tkinsella in forum Linux software
    Replies: 1
    Last Post: 30th August 2005, 03:03 PM

Posting Permissions

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