LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Missing tar ball (https://www.linuxquestions.org/questions/linux-newbie-8/missing-tar-ball-909379/)

eliteparakeet 10-21-2011 12:27 PM

Missing tar ball
 
Hi all,

I've been practicing creating some bash scripts, and I wanted to tar up all of the ones I had been working on to scp them to another server.

I began by entering the following command to tar all of the files in a directory I created /root/Desktop/script_tests (looking back I maybe should've used .* instead of *)

Code:

tar cf scripttarball.tar *
I then did a ls and saw that the only file in my directory was the "scriptarball"

I wanted to test un-tarring it, so I proceeded to type the following:

Code:

tar -xf scripttarball.tar
This did not work, the tar ball remained in that directory and I did not see my files. I did not know if there was an issue with untarring it in this directory, so I proceeded to move the tar ball to /tmp. However, in my hastiness, I had a typo with the command. I typed the following:

Code:

mv scripttarball.tar /tmo
Now I have no idea where I moved this tar ball! I proceeded to type the following:

Code:

find / -name "scripttarball.tar"
pwd

...but had no results. Is my tarball lost!?

The system is a VM running Backtrack 5.

Thank you for your help in advance.

Elite

62chevy 10-21-2011 01:13 PM

I doubt you file is gone. You have a couple of options to find it the easiest it to ' ls / ' amd look for the directory tmo the second is ' updatedb -v ' when that is done then ' locate scripttarball '.

eliteparakeet 10-21-2011 09:52 PM

Thank you very much for the reply, but neither of those worked.

I noticed there is now an empty file in my root (/) directory called tmo (created when I mistyped /tmo).

I also attempted to do an
Code:

ls -lR | grep scripttarball
and came out with only a large number of results saying
Code:

ls: cannot read symbolic link ./proc/10/exe: No such file or directory
I realize this means it may see the file in memory but not on the disk? Correct me if I'm wrong.

I also tried doing
Code:

updatedb -v
followed by the following

Code:

locate "scripttarball.tar" 
locate scripttarball
locate scripttarball.tar
locate -b '\scripttarball.tar'

...but none of these worked.

Any help is greatly appreciated!

lithos 10-22-2011 02:54 AM

your typo "mv scripttarball.tar /tmo"
made the file moved to /
with the name "tmo"

if it's empty then you really didn't have anything TARed into it.

eliteparakeet 10-28-2011 09:44 AM

The file "tmo" is empty
But I DID have something tarred into my tarball!

I had 7-10 .sh scripts in a directory, and proceeded to tar them. They were all put into my tar, but I also noticed that there original copies had been removed.

eliteparakeet 10-31-2011 11:45 AM

Could anyone please be of more assistance? This issue still is not resolved, and I would like to learn what I did wrong here. If you require more clarification please advise.

Thanks,

Elite


All times are GMT -5. The time now is 10:09 AM.