Click to See Complete Forum and Search --> : a few general questions


Frizzle Fry
01-06-2001, 03:38 AM
some things i've always wondered. i'd perfer if people new commands to do these, rather than places to find them in kde.
1) how do i find out what version of linux i'm running?
2) how do i find out what version of x i'm running?
3) how do i check what the total size of a directory, including subdirectories, is?
4) how do i defragment my hard drive?

thanks.

twist
01-06-2001, 03:49 AM
1) uname -a
2) sorry, not too sure. http://www.linuxnewbie.org/ubb/smile.gif i'm sure others know
3) du -sch <dirname>
4) there are tools out there, but really, ext2 takes pretty good care of itself.

Frizzle Fry
01-06-2001, 03:53 AM
thanks a lot. as for not needing to defragment, i recently ran fsck on / and it said that it was 7.5% fragmented, so that's enough that i think it's worthwhile.

arowland
01-06-2001, 04:04 AM
1) Note what scrolls by at boot
2) XFree86 -version at a shell prompt
3) At a shell prompt:
ls -ashR
This will give a total of individual directories/sub directories. Add them all up. http://www.linuxnewbie.org/ubb/smile.gif
Default block size is 4k so you'll see a lot of multiples of 4k
4) Defragment - We don't need no stinkin defragment.

(Just ran du on / - 3.8G! New install.)

[This message has been edited by arowland (edited 06 January 2001).]

twist
01-06-2001, 04:10 AM
du -sch <dir> works *so* much nicer. http://www.linuxnewbie.org/ubb/smile.gif

arowland
01-06-2001, 04:19 AM
Originally posted by twist:
du -sch <dir> works *so* much nicer. http://www.linuxnewbie.org/ubb/smile.gif

Yes, if you're looking for the total only.

Strike
01-06-2001, 07:07 AM
du -h --max-depth=1 is even better http://www.linuxnewbie.org/ubb/smile.gif