Hey there I recently downloaded a folder off an ftp that had [hxc] as the bwginning name of thr dir, now it says it's locked when I try to delete it in KDE. when I try to rm -f in a console it says it doesn't exist, I can't move it, delete it , or change anything about it. When I output a ls -la to a txt it says this about it "drwxr-xr-x 2 root root 4096 Dec 2 10:18 [hXc] Falling Cycle - 2002 - Conflict" and when I just pull a ls -la in the console it shows up with "?[hxc]? blah blah blah" the question marks, I don't get it. Could someone lemme know how dumb I am I would appreciate it, as long as you tell me how to get rid of it to ;) Thanks everyone.
Didn't work :( Hi Jason, Easiest way to remove is to go something like 'rm -rf "*Falling Cycle*"' - the question marks you see are characters that can't be displayed in the current character set, but the globbing in the above will match them anyway. Regards, Chris ----- Original Message ----- From: <BiptoN@charter.net> To: <ext3-users@redhat.com> Sent: Wednesday, December 04, 2002 9:25 AM Subject: Locked Dirs> Hey there I recently downloaded a folder off an ftp that had [hxc] as the > bwginning name of thr dir, now it says it's locked when I try to delete itin> KDE. when I try to rm -f in a console it says it doesn't exist, I can'tmove> it, delete it , or change anything about it. When I output a ls -la to atxt> it says this about it "drwxr-xr-x 2 root root 4096 Dec 2 > 10:18 [hXc] Falling Cycle - > 2002 - Conflict" and when I just pull a ls -la in the console it shows up > with "?[hxc]? blah blah blah" the question marks, I don't get it. Could > someone lemme know how dumb I am I would appreciate it, as long as youtell> me how to get rid of it to ;) Thanks everyone. > > > > _______________________________________________ > Ext3-users mailing list > Ext3-users@redhat.com > https://listman.redhat.com/mailman/listinfo/ext3-users
Doesn't show up in MC. On Tuesday 03 December 2002 3:29 pm, you wrote:> On Tue, 3 Dec 2002 15:25:10 -0800 > Jason Lyons <BiptoN@charter.net>(by way of Jason Lyons > <BiptoN@charter.net>) > > wrote: > > Could > > someone lemme know how dumb I am I would appreciate it, as long as you > > tell me how to get rid of it to ;) Thanks everyone. > > start mc in konsole, i found it the quickest way to delete files/dirs with > fubared names.
It has come down to having to deleting it from debugfs, could someone let me in on how to delete a particular inode from the disk this way. On Tuesday 03 December 2002 4:36 pm, you wrote:> Not an ext3 issue, so I'm replying off-list... > > If you haven't tracked down the problem yet, there are several ways to > delete misnamed files. > > Drop to console, and do 'rm -i *', this will prompt you before deleting. > Just say Y to the one you want to delete. If there are too many, maybe 'rm > -i *hxc*', which will narrow down the list for you. > > If all else fails, you can always do 'ls -ai', note the inode number of the > file, and delete it from debugfs, but it should never come to that. > > At 03:25 PM 12/3/2002 -0800, you wrote: > >Hey there I recently downloaded a folder off an ftp that had [hxc] as the > >bwginning name of thr dir, now it says it's locked when I try to delete it > > in KDE. when I try to rm -f in a console it says it doesn't exist, I > > can't move it, delete it , or change anything about it. When I output a > > ls -la to a txt it says this about it "drwxr-xr-x 2 root root > > 4096 Dec 2 10:18 [hXc] Falling Cycle - > >2002 - Conflict" and when I just pull a ls -la in the console it shows up > > with "?[hxc]? blah blah blah" the question marks, I don't get it. Could > > someone lemme know how dumb I am I would appreciate it, as long as you > > tell me how to get rid of it to ;) Thanks everyone. > > > > > > > >_______________________________________________ > >Ext3-users mailing list > >Ext3-users@redhat.com > >https://listman.redhat.com/mailman/listinfo/ext3-users
Another possibility - if you have Midnight Commander installed, (or can install it) mc shows files visually - you can just highlight the file and hit F8 to delete (very similar to Norton Commander for DOS). I normally install mc just for little problems like this. HTH A. Becker Jason Lyons <BiptoN@charter.net> wrote:> It has come down to having to deleting it from debugfs, couldsomeone let me> in on how to delete a particular inode from the disk this way. > > On Tuesday 03 December 2002 4:36 pm, you wrote: > > Not an ext3 issue, so I'm replying off-list... > > > > If you haven't tracked down the problem yet, there are severalways to> > delete misnamed files. > > > > Drop to console, and do 'rm -i *', this will prompt you beforedeleting.> > Just say Y to the one you want to delete. If there are too many,maybe 'rm> > -i *hxc*', which will narrow down the list for you. > > > > If all else fails, you can always do 'ls -ai', note the inodenumber of the> > file, and delete it from debugfs, but it should never come tothat.> > > > At 03:25 PM 12/3/2002 -0800, you wrote: > > >Hey there I recently downloaded a folder off an ftp that had[hxc] as the> > >bwginning name of thr dir, now it says it's locked when I try todelete it> > > in KDE. when I try to rm -f in a console it says it doesn'texist, I> > > can't move it, delete it , or change anything about it. When Ioutput a> > > ls -la to a txt it says this about it "drwxr-xr-x 2 rootroot> > > 4096 Dec 2 10:18 [hXc] Falling Cycle - > > >2002 - Conflict" and when I just pull a ls -la in the console itshows up> > > with "?[hxc]? blah blah blah" the question marks, I don't getit. Could> > > someone lemme know how dumb I am I would appreciate it, as longas you> > > tell me how to get rid of it to ;) Thanks everyone. > > > > > > > > > > > >_______________________________________________ > > >Ext3-users mailing list > > >Ext3-users@redhat.com > > >https://listman.redhat.com/mailman/listinfo/ext3-users > > > > _______________________________________________ > Ext3-users mailing list > Ext3-users@redhat.com > https://listman.redhat.com/mailman/listinfo/ext3-users
On Tuesday 03 December 2002 06:25 pm, Jason Lyons wrote:> Hey there I recently downloaded a folder off an ftp that had [hxc] as the > bwginning name of thr dir, now it says it's locked when I try to delete it > in KDE. when I try to rm -f in a console it says it doesn't exist, I can't > move it, delete it , or change anything about it. When I output a ls -la to > a txt it says this about it "drwxr-xr-x 2 root root 4096 Dec > 2 10:18 [hXc] Falling Cycle - > 2002 - Conflict" and when I just pull a ls -la in the console it shows up > with "?[hxc]? blah blah blah" the question marks, I don't get it. Could > someone lemme know how dumb I am I would appreciate it, as long as you > tell me how to get rid of it to ;) Thanks everyone. > >Had this with a file a long time ago that I stupidly named with some regex patterns in it. Try something like this: 1> open a file, vi /tmp/delete.pl 2> Put said contents in file #!/usr/bin/perl my $baddir; my $file; my $files; my $x; $baddir = '/tmp/foo'; opendir(DIR, "$baddir") or die "could not open dir $baddir\n"; while ($_ = readdir(DIR)) { $file = "$baddir/$_"; if ($file ne "$baddir/.") { if ($file ne "$baddir/..") { push(@files, "$file"); } } } closedir DIR; for ($x = 0; $x < @files; $x++) { print "chowning file $files[$x]\n"; chown(0,0,"$files[$x]") or die "could not chown file $files[$x]\n"; print "chmoding file $files[$x]\n"; chmod(0666, "$files[$x]") or die "could not chmod file $files[$x]\n"; print "deleting file $files[$x]\n"; unlink("$files[$x]") or die "could not delete file $file\n"; } print "chowning dir $baddir\n"; chown(0,0,"$baddir") or die "could not chown dir $baddir\n"; print "chmoding dir $baddir\n"; chmod(0777, "$baddir") or die "could not chmod dir $baddir\n"; print "deleteing dir $baddir\n"; rmdir("$baddir") or die "could not delete dir $baddir\n"; print "done\n"; 3> In the above, change '/tmp/foo' to the path (full path) of the dir in question. 4> chmod 755 /tmp/delete.pl 5> as root run delete.pl Hopefully you'll be in luck. Sorry for the sucky perl. Jeremy