[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV 2-8 compiled on Irix 5.3 (was problem)
From: |
David Combs |
Subject: |
Re: LYNX-DEV 2-8 compiled on Irix 5.3 (was problem) |
Date: |
Tue, 3 Mar 1998 05:58:29 -0800 (PST) |
> From address@hidden Mon Mar 2 00:26:58 1998
> From: Philip Webb <address@hidden>
> Subject: LYNX-DEV 2-8 compiled on Irix 5.3 (was problem)
>
> BTW -- since i'm still a bit naive about some things --
> can i be sure that using rm -r ordinarily -- ie `unsafe' --
> will never remove anything ABOVE the current directory?
> this comes up eg when i want to remove the files from an old Lynx version.
>
> --
> ========================,,============================================
Re "rm -r". Or just plain rm.
EXTREMELY dangerous.
Of course you alias rm to 'rm -i'.
For large numbers of files, you cannot spend
all day answering 'y'. So "\rm" avoids the
alias. But dangerous again.
The real danger is that ".." is ALSO a FILE that
can get removed. Which is matched by "*" -- or
maybe it's ".*" that mataches it. Anyway
I got caught once.
So what I have started to do is when I want to
rm a lot of files, I first MOVE them somewhere
else, where it is SAFE to make a mistake.
I have a subdirectory todelete/todelete/todelete
(hey, I'm taking no chances!), I put all the filenames
I want to remove into a file, then
mv `cat names.foo` todelete/todelete/todelete
cd (or pushd) !$ (this is csh)
sh (important! Don't want the following "rm"
on the history list!)
ls (make sure!)
du -a (maybe also to catch subdirs)
THEN: rm *
If you screw up and also rm the directory ABOVE
the current pwd, you are still ok. (Whew!)
Anyway, that's my scheme.
---
My machine has two physical disks. So more often than
with tape, I backup recent files, via cp -p, to the
other disk (ie, a fs ON the other disk), so that if
a disk crashes, I at least have the stuff since real
backup on the other disk.
Of course does not protect from fire, lightning,
theft, etc.
Hope this helps
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: LYNX-DEV 2-8 compiled on Irix 5.3 (was problem),
David Combs <=