Hi everyone, I have created a folder on my desktop (suse 10, gnome desktop), it is locked. Now i am trying to erase it but the system says i am not a superuser, so i am not authorized. How can i erase this file (sen it to trash?). Is it nessesary to do it form text mode or from a console?? which commands do i need? Reagrds Thanks for your answers in advance Juan.-
On 10/18/05, JUAN ERNESTO FLORES BELTRAN
Hi everyone,
I have created a folder on my desktop (suse 10, gnome desktop), it is locked. Now i am trying to erase it but the system says i am not a superuser, so i am not authorized.
How can i erase this file (sen it to trash?). Is it nessesary to do it form text mode or from a console?? which commands do i need?
To do it from console start 'konsole' and enter: % su <give superuser password> # cd /path/to/folder # rm -r folder-do-remove # exit Last command ends superuser session. Alternatively try 'kdesu' to start konqueror in from konsole: % kdesu "konqueror --profile filemanagement" Now, konqueror runs in superuser mode. \Steve
On Tuesday 18 October 2005 14:20, JUAN ERNESTO FLORES BELTRAN wrote:
Hi everyone,
I have created a folder on my desktop (suse 10, gnome desktop), it is locked. Now i am trying to erase it but the system says i am not a superuser, so i am not authorized.
How can i erase this file (sen it to trash?). Is it nessesary to do it form text mode or from a console?? which commands do i need?
$ cd $ cd Desktop $ su [give root password] # rm -rf [name-of-your-directory] HTH Fergus
Reagrds Thanks for your answers in advance Juan.-
-- Fergus Wilde Chetham's Library Long Millgate Manchester M3 1SB UK Tel: 0161 834 7961 Fax: 0161 839 5797 http://www.chethams.org.uk
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking? For a single file? As root? What if he mistypes and erases his whole disk? - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDVRbvtTMYHG2NR9URAv7WAJ0bLOPGhu0WW+tGJXJ17+eBKfYTrACeIFfd 1DY1ANPZvo534KuNfZzD0ao= =yJkW -----END PGP SIGNATURE-----
On 10/18/05, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)? \Steve
On Tue, 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
On 10/18/05, Carlos E. R.
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
\Steve
How about
sudo rm
On 10/18/05, Ken Schneider
On Tue, 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
On 10/18/05, Carlos E. R.
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
\Steve
How about sudo rm
and be done with it. and NO a reboot is -not- necessary.
As can be read in the OP Juan already tried to do so and found that it is locked. Hmm, what now? \Steve
On 10/18/05, Ken Schneider
On Tue, 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
On 10/18/05, Carlos E. R.
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
\Steve
How about sudo rm
and be done with it. and NO a reboot is -not- necessary.
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now? \Steve
Steve Graegert wrote:
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now?
Find out what process is locking the file and kill it: fuser -k -i /path/to/file Sandy -- List replies only please! Please address PMs to: news-reply (@) japantest (.) homelinux (.) com
On 10/18/05, Sandy Drobic
Steve Graegert wrote:
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now?
Find out what process is locking the file and kill it: fuser -k -i /path/to/file
As root, of course :-) \Steve
Hi everyone, Thanks for your usefull answers, i did delete the file... Regards.-
From: Steve Graegert
To: Sandy Drobic CC: suse-linux-e@suse.com Subject: Re: [SLE] Erasing a File (Doubt) Date: Tue, 18 Oct 2005 20:17:03 +0200 On 10/18/05, Sandy Drobic
wrote: Steve Graegert wrote:
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now?
Find out what process is locking the file and kill it: fuser -k -i /path/to/file
As root, of course :-)
\Steve
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 18 October 2005 20:12, Sandy Drobic wrote:
Steve Graegert wrote:
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
As can be read in the OP Juan already tried to do so and found that it is "locked" (whatever it means). Hmm, what now?
Find out what process is locking the file and kill it: fuser -k -i /path/to/file
Files aren't locked that way in linux, you can delete a file even if a million applications were holding it open (although of course it wouldn't be finally deleted until the last program exited or closed the file, but it wouldn't be visible in the directory anymore) The directory must be "locked" (as in having a pad lock on the icon on the desktop) because it's owned by another user. If it were a single file or an empty directory you would be able to delete it anyway without becoming root, but a directory with files in it is worse. You can rename it if you like, but to delete it you need to become root, since you need to delete the files in the directory as well as the directory itself.
On 10/18/05, Ken Schneider
On Tue, 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
On 10/18/05, Carlos E. R.
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
\Steve
How about sudo rm
and be done with it. and NO a reboot is -not- necessary.
BTW: sudo requires editing the list of sudoers. A procedure not recommended for beginners. (Sorry for the double posting) \Steve
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
But Fergus sugested to do: # rm -rf [name-of-your-directory] as root. The -r stands for recursive, and -f for force (no questions asked). If there is an error, an horrible lot of files may be erased, he could destroy the system. The proper procedure would be to become superuser, yes, then delete each thing explicitly. First empty the directory, then erase it with rd. If a recursive erase is used, as root, first you have to check carefully what is inside, specially links. IMO, of course :-) - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDVaEYtTMYHG2NR9URAuIpAJ901z/cRUpF2hVwho/F5M6apFk2LQCgmJDX 09X5Fjylic7/ugVRZEuyhiM= =4FhS -----END PGP SIGNATURE-----
On Wednesday 19 October 2005 02:27, Carlos E. R. wrote:
The Tuesday 2005-10-18 at 19:50 +0200, Steve Graegert wrote:
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
But Fergus sugested to do:
# rm -rf [name-of-your-directory]
as root. The -r stands for recursive, and -f for force (no questions asked). If there is an error, an horrible lot of files may be erased, he could destroy the system.
The proper procedure would be to become superuser, yes, then delete each thing explicitly. First empty the directory, then erase it with rd. If a recursive erase is used, as root, first you have to check carefully what is inside, specially links.
IMO, of course :-)
-- Cheers, Carlos Robinson
Well, there's no harm in caution. They'd have to be hard links, though, for it to matter, wouldn't they? I wasn't advising him to type rm -rf / ; if he did, then he'd be comprehensively *****ed, it's true. But if he's that bad at following directions he probably crosses the road by shutting his eyes tight and running out shouting 'Mind the chickens!' and then doing the jitterbug on the centre line and finds his way home by following the nicest shaped cloud. -- Fergus Wilde Chetham's Library Long Millgate Manchester M3 1SB UK Tel: 0161 834 7961 Fax: 0161 839 5797 http://www.chethams.org.uk
Fergus Wilde wrote:
But if he's that bad at following directions he probably crosses the road by shutting his eyes tight and running out shouting 'Mind the chickens!' and then doing the jitterbug on the centre line and finds his way home by following the nicest shaped cloud.
Which is the perfect picture of an average newbie. Present company excluded of course. Real newbies don't read lists. :-) Regards, -- Jos van Kan registered Linux user #152704
On Tuesday, October 18, 2005 @ 9:51 AM, Steve Graegert wrote:
On 10/18/05, Carlos E. R.
wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
The OP suggested that the file is mysteriously locked somehow. What would you suggest to do about it without being in superuser mode (and without rebooting, of course)?
\Steve
How about, after the su, doing cds to the directory within which the file sits and then simply doing an rm on that file? Probably safer, but if you're careful, your way is fine too, though it would be easier to misstep and delete too much, I would think. Greg Wallace
On Tuesday 18 October 2005 16:38, Carlos E. R. wrote:
The Tuesday 2005-10-18 at 14:37 +0100, Fergus Wilde wrote:
How can i erase this file (sen it to trash?).
$ cd
$ cd Desktop
$ su [give root password]
# rm -rf [name-of-your-directory]
Are you joking?
For a single file? As root? What if he mistypes and erases his whole disk?
-- Cheers, Carlos Robinson
Then he'd be a bit of doozie. The instructions will work just fine for erasing a directory, which is what he wanted to do. He'd be in /home/[him]/Desktop when he types rm, so he's going to have to type 'rm -rf / ' as a matter of policy in order to wipe the disk. With luck like that he's not going to live long enough to worry about his disk. -- Fergus Wilde Chetham's Library Long Millgate Manchester M3 1SB UK Tel: 0161 834 7961 Fax: 0161 839 5797 http://www.chethams.org.uk
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2005-10-18 at 13:20 -0000, JUAN ERNESTO FLORES BELTRAN wrote:
I have created a folder on my desktop (suse 10, gnome desktop), it is locked. Now i am trying to erase it but the system says i am not a superuser, so i am not authorized.
You need to be root to erase it. You are not its owner. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDVRZMtTMYHG2NR9URAt+NAJ4kiH2pWqcMVD59PI33RA+xYumBTwCfa9Vn dlb6NsT7O3sApA3ghu2BX34= =u2v8 -----END PGP SIGNATURE-----
participants (9)
-
Anders Johansson
-
Carlos E. R.
-
Fergus Wilde
-
Greg Wallace
-
Jos van Kan
-
JUAN ERNESTO FLORES BELTRAN
-
Ken Schneider
-
Sandy Drobic
-
Steve Graegert