LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] HD question

[ILUG] HD question

bscanlan at irish-times.com bscanlan at irish-times.com
Thu Mar 22 18:00:19 GMT 2001


On Thu, Mar 22, 2001 at 04:41:05PM +0000, David Murphy wrote:
> 
> Maybe *you* can do it with a filesystem debugger, but I know *I*
> certainly couldn't, and I felt it was a safe bet most other people
> couldn't either. If you do figure it out, let us know, I assume
> everyone else would be as impressed as I to see it demonstrated 8)

Well holy moly, it was ridiculously easy in Linux.

/debian's a *shock* debian install that I keep for whenever I feel like 
attempting to getting used to debian. *grin*.

So, I umounted it and touched a file...

[root at singer /debian]# pwd
/debian
[root at singer /debian]# mount
/dev/sdb2 on / type ext2 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/scd0 on /mnt/cdrom type iso9660 (ro)
[root at singer /debian]# ls -ali
total 8
 522094 drwxrwxr-x    2 root     root         4096 Mar 22 17:54 .
      2 drwxr-xr-x   23 root     root         4096 Mar  9 18:13 ..
 522209 -rw-r--r--    1 root     root            0 Mar 22 17:54 blah

...and mounted /debian.
[root at singer /debian]# mount
/dev/sdb2 on / type ext2 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/scd0 on /mnt/cdrom type iso9660 (ro)
/dev/sda2 on /debian type ext2 (rw)

"Shockingly" enough, blah ain't available anymore. 
[root at singer /debian]# ls
bin   cdrom  etc     home    lib         mnt  proc    root  tmp  var
boot  dev    floppy  initrd  lost+found  opt  redhat  sbin  usr  vmlinuz

[root at singer /debian]# debugfs
debugfs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
debugfs:  open -w /dev/sdb2
debugfs:  ls
2 (12) .   2 (12) ..   11 (20) lost+found   32577 (12) proc   65153 (12) var   
162881 (12) tmp   179169 (12) dev   195457 (12) usr   293185 (12) etc   
342049 (12) bin   358337 (12) boot   390913 (12) home   423489 (12) lib   
472353 (12) mnt   521217 (12) opt   537505 (12) root   553793 (12) sbin   
866 (24) .bash_history   522094 (16) debian   717527 (16) 
debugfs:  cd debian
debugfs:  ls
522094 (12) .   2 (12) ..   522209 (4072) blah   
debugfs:  rm blah
Kill file by inode 522209

And, eh, that's it. That wasn't hard at all. Damnit. :)

Right, in Solaris...
I don't think I ever got fsdb to delete a file now that I think about
it, and I haven't got a good guide to fsdb around. Documentation could
be a bit better...

Usual story, I've touched "goo" under /mnt1, and mounted stuff on /mnt1.
# ncheck  /dev/dsk/c0t0d0s0 |grep /mnt1/goo
231037  /mnt1/goo
# clri /dev/dsk/c0t0d0s0 231037
clearing 231037
#

Brian.
-- 
Brian Scanlan, Systems Administrator.
Irish Times New Media - http://www.ireland.com




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell