Probably a dumb question, but... I had a backup of a lot of directories before installing 9.0. Now I want to get rid of the stuff. I have a directory /oldSuse/root where the file .bash_history -rw------ can't be deleted by root. I also cannot change the permissions. Help. -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
Am Donnerstag, 4. Dezember 2003 23:39 schrieb Jim Sabatke:
Probably a dumb question, but...
I had a backup of a lot of directories before installing 9.0. Now I want to get rid of the stuff. I have a directory /oldSuse/root where the file .bash_history -rw------ can't be deleted by root. I also cannot change the permissions.
Hmm, reiserfs? Time to start a fsck, best from rescue-system. -- Andreas
On Thu, 04 Dec 2003 14:39:22 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
/oldSuse/root where
cd /oldSuse/root
the file .bash_history
# rm -f ./.bas* . -- /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\ \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" /// Fortune's Real-Life Courtroom Quote #52: Q: What is your name? A: Ernestine McDowell. Q: And what is your marital status? A: Fair.
mjt wrote:
On Thu, 04 Dec 2003 14:39:22 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
/oldSuse/root where
cd /oldSuse/root
the file .bash_history
# rm -f ./.bas*
.
Tried it. Here are the results: yoda:/oldSuSe/root # rm -f *bas* yoda:/oldSuSe/root # ll total 7 drwxrwxrwx 2 root root 4096 2003-12-03 20:03 . drwxr-xr-x 4 root root 1024 2003-12-04 14:34 .. -rw------- 1 root root 1485 2003-10-23 01:19 .bash_history yoda:/oldSuSe/root # rm -f ./.bas* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root # -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
On Thu, 04 Dec 2003 15:16:22 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
drwxrwxrwx 2 root root 4096 2003-12-03 20:03 . drwxr-xr-x 4 root root 1024 2003-12-04 14:34 .. -rw------- 1 root root 1485 2003-10-23 01:19 .bash_history yoda:/oldSuSe/root # rm -f ./.bas* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
... what does 'lsattr ./.ba*' reveal? . -- /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\ \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" /// Troubled day for virgins over 16 who are beautiful and wealthy and live in eucalyptus trees.
mjt wrote:
On Thu, 04 Dec 2003 15:16:22 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
drwxrwxrwx 2 root root 4096 2003-12-03 20:03 . drwxr-xr-x 4 root root 1024 2003-12-04 14:34 .. -rw------- 1 root root 1485 2003-10-23 01:19 .bash_history yoda:/oldSuSe/root # rm -f ./.bas* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
... what does 'lsattr ./.ba*' reveal? .
yoda:/oldSuSe/root # lsattr ./.ba* ----ia------- ./.bash_history yoda:/oldSuSe/root # -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
On Thu, 04 Dec 2003 16:08:55 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
... what does 'lsattr ./.ba*' reveal?
yoda:/oldSuSe/root # lsattr ./.ba* ----ia------- ./.bash_history yoda:/oldSuSe/root #
... easy peasy ... # chattr -i ./.bash* # rm ./.bash* ... sorry it took me so long :) . -- /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\ \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
mjt wrote:
On Thu, 04 Dec 2003 16:08:55 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
... what does 'lsattr ./.ba*' reveal?
yoda:/oldSuSe/root # lsattr ./.ba* ----ia------- ./.bash_history yoda:/oldSuSe/root #
... easy peasy ... # chattr -i ./.bash* # rm ./.bash*
... sorry it took me so long :) .
That didn't seem to work either. Maybe I should just reformat the partition. yoda:/oldSuSe/root # chattr -i ./.bash* yoda:/oldSuSe/root # rm ./.bash* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root # -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
On Thu, 04 Dec 2003 16:38:24 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
That didn't seem to work either. Maybe I should just reformat the partition.
yoda:/oldSuSe/root # chattr -i ./.bash* yoda:/oldSuSe/root # rm ./.bash* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
... that REALLY surprises me: did you happen to do a 'lsattr' on it again to see if the 'immutable' bit was still set? . -- /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\ \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" /// Why did the Roman Empire collapse? What is the Latin for office automation?
mjt wrote:
On Thu, 04 Dec 2003 16:38:24 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
That didn't seem to work either. Maybe I should just reformat the partition.
yoda:/oldSuSe/root # chattr -i ./.bash* yoda:/oldSuSe/root # rm ./.bash* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
... that REALLY surprises me: did you happen to do a 'lsattr' on it again to see if the 'immutable' bit was still set? .
OK, I did an lsattr and it still had 'a' set. So I then did a chattr -a and then it deleted. I had no idea these utilities existed. Thanks! -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
On Thu, 04 Dec 2003 17:07:17 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
yoda:/oldSuSe/root # chattr -i ./.bash* yoda:/oldSuSe/root # rm ./.bash* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
... that REALLY surprises me: did you happen to do a 'lsattr' on it again to see if the 'immutable' bit was still set?
OK, I did an lsattr and it still had 'a' set. So I then did a chattr -a and then it deleted. I had no idea these utilities existed.
... damb, i forgot about the other flag!!!! anyway, stick around, or out in the COL* newsgroups and we'll throw some other cool stuff ur way :) . -- /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\ \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" /// The sooner you make your first 5000 mistakes, the sooner you will be able to correct them. - Nicolaides
Is your filesystem maybe read only? what is the result of: cd /oldSuSe/root mount . Op vrijdag 5 december 2003 00:16, schreef Jim Sabatke:
mjt wrote:
On Thu, 04 Dec 2003 14:39:22 -0800, Jim Sabatke <jsabatke@execpc.com> wrote:
/oldSuse/root where
cd /oldSuse/root
the file .bash_history
# rm -f ./.bas*
.
Tried it. Here are the results:
yoda:/oldSuSe/root # rm -f *bas* yoda:/oldSuSe/root # ll total 7 drwxrwxrwx 2 root root 4096 2003-12-03 20:03 . drwxr-xr-x 4 root root 1024 2003-12-04 14:34 .. -rw------- 1 root root 1485 2003-10-23 01:19 .bash_history yoda:/oldSuSe/root # rm -f ./.bas* rm: cannot remove `./.bash_history': Operation not permitted yoda:/oldSuSe/root #
-- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke
Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
-- Richard Bos Without a home the journey is endless
Richard Bos wrote:
Is your filesystem maybe read only?
what is the result of: cd /oldSuSe/root mount .
No, I've delete lots of files from the filesystem already. yoda:/oldSuSe/root # mount . mount: can't find /oldSuSe/root in /etc/fstab or /etc/mtab yoda:/oldSuSe/root # cd .. yoda:/oldSuSe # mount . mount: /dev/hda6 already mounted or /oldSuSe busy mount: according to mtab, /dev/hda6 is already mounted on /oldSuSe yoda:/oldSuSe # -- Jim Sabatke Hire Me!! - See my resume at http://my.execpc.com/~jsabatke Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup.
participants (4)
-
Andreas Winkelmann
-
Jim Sabatke
-
mjt
-
Richard Bos