Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Filename star



On  0, "Stephen J. Turnbull" <turnbull@example.com> wrote:
> >>>>> "Subba" == Subba Rao <subb3@example.com> writes:
> 
>     Subba> To remove this I did,
> 
>     Subba> $ rm -i *
> 
>     Subba> and got rid of it.
> 
> $ rm -i '*' will save hitting the 'n' key a few times.
> 
>     Subba> I don't know how this file got created. What is the best
>     Subba> way to trace the creation of such files? I want to know the
> 
> Look at the contents.  Too late....
> 
> If the file is open at the time, fuser(1) will tell you who is using
> it.  You probably also want to look at the creation date (the time
> listed by ls(1) is modification date).  `man ls' should tell you how
> to do that.  file(1) may be able to tell you what kind of file it
> probably is even if the contents are unreadable to humans.
> 
> Otherwise you can't know what (Unix) process created it.
> 
>     Subba> process that is creating it. External login is impossible
> 
> Does it have a net connection at all?  If so, what makes you so sure
> that creation of files by external agents is impossible?  In fact, it
> seems more likely that a program that knows nothing of the shell
> metacharacters would create files like that, so an externally
> controlled shell is actually not a likely source for such files.
> 
>     Subba> to this box. It has to be one of the several tools I have
>     Subba> downloaded and compiled.  How do you search for files, with
>     Subba> meta characters as their names?
> 
> su -c "find / | grep '[*?]'"
> 
> is a start, variations an exercise for the reader.  (If external login
> were possible, I would suggest looking for '...' and files with
> control characters as names, etc.)
> 
> 

Thanks for the suggestions. When I am uncertain about the files to be deleted,
I prefer to use the '-i' option. That would atleast guarantee the safety of my
other files. I have learnt quite a bit too, regarding the various techniques to
delete the meta-character named files.

I guess it is time to implement the 'wastebasket' idea on linux users $HOME.

Thanks everyone.

Subba Rao
subb3@example.com
http://pws.prserv.net/truemax/

 => Time is relative. Here is a new way to look at time. <=
http://www.smcinnovations.com
-------------------------------------------------------------------
Next Technical Meeting: January 14 (Fri) 19:00
* Topic: "glibc - current status and future developments"
* Guest Speaker: Ulrich Drepper (Cygnus Solutions)
* Place: Oracle Japan HQ 12F Seminar Room (New Otani Garden Court)
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links