On Sat, 2007-11-17 at 16:32 -0800, Randall R Schulz wrote:

> > Critique me here.  As I'm going by theory.  I would move the
> > current /bin/rm to a new location.
> 
> Whoa! No, no no. Never do that!!
> 
> No, just create a directory ~/bin (equally, $HOME/bin) and put your 
> personal scripts there. Make sure that directory precedes the stock 
> directories in the PATH variable. (I don't recall if $HOME/bin is part 
> of the stock PATH or not, but if it isn't, add a line like this to 
> your "$HOME/.bash_profile" script:
> 
> PATH="$HOME/bin:$PATH"
> 
> > Then I would create an rm script 
> > and place it in /bin where the current rm was located.
> 
> No. Put it in ~/bin ($HOME/bin).
> 
> 
> > But within the rm script, I would point to the rm command's full path
> > when using rm's functionality.
> 
> Well, the point is to avoid what the stock "rm" does and instead move 
> the file to an out-of-the-way place from which you can retrieve it 
> should you change your mind.
> 
> 
> > Thus users would never see the difference when they run /bin/rm, but
> > the script does the interpretation to /somewherelse/rm.
> >
> > Did I figure it out right?
> 
> Uh. Keep trying.
> 
> Perhaps for someone as new to all this as you, playing around with 
> replacements for key OS utilities isn't the best idea.
> 
> You could use Konqueror or ... what's it called? There's a Gnome file 
> manager, too. They're GUIs that have trash cans and "Empty Trash" 
> commands and all that usual stuff.
> 
> 
I'm not that new.  Just new to scripting itself within Linux, but
willing to take my chances and experiment (even break) to further my
knowledge.  As for GUI (Nautilus on GNOME), as Patrick pointed out, when
rm-ing on the command line, it doesn't fall into the GUI trash can.
Only when you delete within GUI.  I double-verified this just to be
sure. 

I didn't realize that you could create ~/bin which would take precedence
over standard /bin.  Now that I know, I can proceed a bit more safely.  

To me, this is an excellent trial/error exercise that coincides
perfectly with my scripting studies.  And I do appreciate the feedback
you've given.  Lots of good foundational information from you.  I thank
you.


-- 
---Bryen---

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to