Find the answer to your Linux question:
Results 1 to 3 of 3
hi all i just been looking into linux for a few weeks now reading the book: begining Ubuntu LTS from Novice to professionals for 8.04 folowing the book step by ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2

    moving a complete directory in ubuntu lts 8.04

    hi all

    i just been looking into linux for a few weeks now reading the book: begining Ubuntu LTS from Novice to professionals for 8.04
    folowing the book step by step but geting stuck on teh following command


    tar -cC /var . | tar -vxC /newvar

    i use sudo before teh tar command but its not doing anything and gives that cowardly refusing eror mesage even though i put the dot at the end

    any iseas would be appreicated

    regards

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Fair warning, I'm no expert with tar, but I can't puzzle out exactly what your aim is here.

    What are you trying to accomplish, and what is the exact error message you're getting?

    If I'm parsing this correctly, you're looking to change to the /var directory, create an archive, change to /newvar, and extract that archive?

    I think that should look more like this, but I haven't tried it.

    Code:
    tar -C /var tar -cf - . ) | tar -xvf - -C /newvar
    More fun with tar at commandline fu.
    Commands using tar | commandlinefu.com

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2
    hi

    thanks for youre reply
    according to the book its making a archive of everything in teh var directory and copying it to the newvar directory as if its a copy of that directory


    now the comand is corerct and fater trying it on 2 diferent machines it turns out that sudo wont work for that command as logged in as root and was able to use

    tar -cC /var . | tar -vxC /newvar


    thanks

Posting Permissions

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