Results 1 to 5 of 5

Thread: Tar error: Attempt to create archive of no files. Nothing dumped.

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

    Exclamation Tar error: Attempt to create archive of no files. Nothing dumped.

    Input File
    Code:
    animals/cat.txt
    fruits/apple.taxt
    This is my code ....
    Code:
    clhost=ABCServer
    text=Load_From_the_List
    
    if [ "$text" = "Load_From_the_List" ] ; then
    for FNAME in `cat /home/team/ca.txt`
    do
    ssh $clhost " cd /opt/things/ && tar cvf /tmp/ABC.tar ${line}"
    done
    fi
    so when i run these script im getting below error:
    Code:
    Attempt to create archive of no files. Nothing dumped.
    Attempt to create archive of no files. Nothing dumped.
    but files are exists in the ABCServer.

    could you please someone explain me what went wrong in my code.

    Thanks
    Inshaf
    Last edited by nixcraft; 22nd January 2013 at 12:34 PM.

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    367
    Thanks
    0
    Thanked 55 Times in 51 Posts
    Rep Power
    7

    Default

    hi,

    $line is an unknown variable.

    ps: please, use code tag.
    «A problem clearly stated is a problem half solved.»

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

    Default

    Great thanks.... i couldn't notice it because of the tension i guess..

    now the code is working but what happening was only the last file getting into the tar. first file is not in the tar.

    can u please explain me how can i do that ?

    Thanks
    Inshaf

  4. #4
    Senior Member
    Join Date
    Aug 2011
    Posts
    367
    Thanks
    0
    Thanked 55 Times in 51 Posts
    Rep Power
    7

    Default

    I don't use tar much, probably create overwrites existing tar.
    you need to append (-r) files if tar exists.
    «A problem clearly stated is a problem half solved.»

  5. #5
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,374
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    I am assuming that your problem was sorted out with Watael's solution.

    /Closed


    PS: If your problem not sorted out send me PM and I will reopen the thread.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unix script - create archive backup on remote computer
    By Big Benn in forum Shell scripting
    Replies: 0
    Last Post: 22nd May 2012, 09:40 PM
  2. configure: error: C++ compiler cannot create executables
    By eawedat in forum Ubuntu / Debian
    Replies: 2
    Last Post: 26th February 2010, 11:50 PM
  3. Replies: 2
    Last Post: 1st February 2010, 03:04 PM
  4. Replies: 1
    Last Post: 30th September 2009, 04:56 PM
  5. How to archive files along with folders using TAR?
    By Charlie82 in forum Shell scripting
    Replies: 1
    Last Post: 31st July 2007, 05:26 AM

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41