[lug] lost file

Peter Hutnick peter-lists at hutnick.com
Sun Apr 14 22:37:44 MDT 2002


On Sunday 14 April 2002 10:18 pm, Yuko Jonah wrote:
> Hi all,
> yesterday i downloaded a file alsa then i moved it
> from
> /usr/local  alsa-util-0.9 0beta12.tar.bz2 to download
> and lost it. I have search with locate, find, whereis
> and moving from file to file still can not find the
> file i downloaded. At the time of the move i did not
> creat the download just move it, hoping by doing so
> will creat the download folder.
> thanks,
> yuko

You may have noticed that there is no "rename" command in UNIX.  It would be 
redundant*.

It is likely that you did something like "mv alsa-util-0.9 0beta12.tar.bz2 
/usr/lcoal" or something similar.  The result would be that the name of the 
file would change, which would make it hard to find by name.  (The file would 
now be in /usr and named lcoal.)

First thing to do is look at your shell's history file.  If you use bash 
(probably) see the file ~/.bash_history.  A good first step would be "grep 
alsa-util-0.9 0beta12.tar.bz2 ~/bash_history".  You will probably find the 
command with the typo, which will tell you "where" the file is both in terms 
of directory /and/ filename.

In the future end all "mv" commands with "/." unless you want to change the 
filename.  For instance "mv alsa-util-0.9 0beta12.tar.bz2 /usr/src/." assures 
that you won't whack the filename.

Oh, and make sure your locate database is up to date.  Maybe "updatedb" as 
root?

Next up, a discussion of the importance of the second ">" in ">>" when piping 
into and existing file ;-)

Good luck!

-Peter

*It is redundant in DOS now that there is a move command, but at one time 
there was a copy, delete, and rename command but no move.  You can do 
everything with those three that you can do with copy, move, and delete.  And 
vice-versa, but sometimes with an extra step.

-P



More information about the LUG mailing list