[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 33 MB used on a empty partition?



On Fri, 07 Jan 2005 22:09:39 +0000, Joao Clemente <jpcl@rnl.ist.utl.pt> wrote:
> Hmmm... too messy for what I was asking... Isnt't there a simple tool
> that shows something like
> /dev/hda1 : ext2, 1024byte/block,
> /dev/hda2 : ext3, 2048byte/block, 10Mb journal <journal specific stuff
> like ... journal "sync" period time>
> /dev/hda3 : vfat, ...
> 
> even if we call it one by one (show_fs /dev/hda1, show_fs /dev/hda2,..)?
> dumpe2fs seems to show information similar to "tune2fs -l" ... I think
> it shows most of the information I would like to find, altough we're
> alredy assuming this is a ext2/ext3 filesystem...

I haven't come across a program that does this. But, here a bash
one-liner that does at least part of what you want. It should be one
big line, replace /dev/hda2 with your partition, run as root. Its
output is like:

/dev/hda2, 1024 byte/block, 16452 kb journal

--snip--
part=/dev/hda2;blocksize=`tune2fs -l $part | awk '/Block size/ {print
$3}'`;tune2fs -l $part | awk '/Journal inode/ {print $3}'  | xargs -i
debugfs -R 'stat <{}>' $part 2>&1 | awk '/Blockcount/ {print $4}' |
xargs -i expr {} \* $blocksize / 1024 | xargs -i  echo $part,
$blocksize byte/block, {} kb journal
--/snip--

> [...] So... there is must be a way to know
> this "last accessed time" ... wich tool is it?

Use stat or ls -lu.

Rabin



Reply to: