Use fdisk to find disk partitions
  ex: sudo fdisk /dev/sda
  Command (m for help): p
  Disk /dev/sda: 500.1 GB, 500107862016 bytes
  255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x9e022586
  
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048      409599      203776    7  HPFS/NTFS/exFAT
    /dev/sda2          409600    93569023    46579712    7  HPFS/NTFS/exFAT
    /dev/sda3        93569024   976560127   441495552    5  Extended
    /dev/sda4       976560128   976771119      105496    c  W95 FAT32 (LBA)
    /dev/sda5        93571072   966322175   436375552   83  Linux
    /dev/sda6       966324224   976560127     5117952   82  Linux swap / Solaris

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

Use dumpe2fs to get lots of info on a file system - e.g. block size
  ex: sudo dumpe2fs /dev/sda5
  Filesystem volume name:   Too Many Secrets
  Last mounted on:          /
  Filesystem UUID:          20f31ff5-4e93-4356-bd4c-2250689fb651
  Filesystem magic number:  0xEF53
  Filesystem revision #:    1 (dynamic)
  Filesystem features:      has_journal ext_attr resize_inode
       dir_index filetype needs_recovery extent flex_bg sparse_super
       large_file huge_file uninit_bg dir_nlink extra_isize
  Filesystem flags:         signed_directory_hash
  Default mount options:    user_xattr acl
  Filesystem state:         clean
  Errors behavior:          Continue
  Filesystem OS type:       Linux
  Inode count:              27279360
  Block count:              109093888
  Reserved block count:     1090660
  Free blocks:              76954124
  Free inodes:              26093405
  First block:              0
  Block size:               4096
  Fragment size:            4096
  Reserved GDT blocks:      165
  Blocks per group:         32768
  Fragments per group:      32768
  Inodes per group:         8192
  Inode blocks per group:   512
  Flex block group size:    16
  Filesystem created:       Fri Oct 22 14:14:17 2010
  Last mount time:          Wed Nov 14 10:25:52 2012
  Last write time:          Wed Nov 14 10:25:42 2012
  Mount count:              1253
  Maximum mount count:      -1
  Last checked:             Sat Feb 12 08:59:35 2011
  Check interval:           0 ()
  Lifetime writes:          1366 GB
  Reserved blocks uid:      0 (user root)
  Reserved blocks gid:      0 (group root)
  First inode:              11
  Inode size:               256
  Required extra isize:     28
  Desired extra isize:      28
  Journal inode:            8
  First orphan inode:       8525311
  Default directory hash:   half_md4
  Directory Hash Seed:      3684f2fe-749a-454c-a0de-6066e0f56182
  Journal backup:           inode blocks
  Journal features:         journal_incompat_revoke
  Journal size:             64M
  Journal length:           16384
  Journal sequence:         0x002007fd
  Journal start:            2839

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

Use getfattr to see extended file attributes
  ex: getfattr -d  Courses/c4029/lectures/FileSystem/*
  # file: Courses/c4029/lectures/FileSystem/ch10.pdf
  user.xdg.origin.url="http://www.unf.edu/public/cop4610/ree/PPT/Silber/ch9.pdf"

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

Use setfattr -n name -v value * to set file attributes
  see man page

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 
		 
Use lsattr to list attributes
  ex: lsattr Courses/C4029/Lectures/FileSystem/
  ---------j---e- Courses/C4029/Lectures/FileSystem/notes.txt
  -u-----------e- Courses/C4029/Lectures/FileSystem/File1.class
  -u-----------e- Courses/C4029/Lectures/FileSystem/LockitFrame.class
  -u-----------e- Courses/C4029/Lectures/FileSystem/Lockit.class
  ---------j---e- Courses/C4029/Lectures/FileSystem/Lockit.java
  ---------j---e- Courses/C4029/Lectures/FileSystem/LockingExample.java
  ---------j---e- Courses/C4029/Lectures/FileSystem/ch12.pdf
  ---------j---e- Courses/C4029/Lectures/FileSystem/ch10.pdf
  ---------j---e- Courses/C4029/Lectures/FileSystem/fa.txt
  ---------j---e- Courses/C4029/Lectures/FileSystem/ch11.pdf
  ---------j---e- Courses/C4029/Lectures/FileSystem/LockingExample_old.java
  ---------j---e- Courses/C4029/Lectures/FileSystem/a.html
  -u-----------e- Courses/C4029/Lectures/FileSystem/File2.class
  lsattr: Operation not supported While reading flags on
  Courses/C4029/Lectures/FileSystem/silberschatz.pdf
  -------------e- Courses/C4029/Lectures/FileSystem/Fuse

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 
		 
Use chattr to change attributes - see man page for possibles
  ex: sudo chattr +j Courses/C4029/Lectures/FileSystem/Lockit.java
  attributes:
    (a) append only       (d) no  dump          (i) immutable  
    (c) compressed        (e) extent format     (j) data journaling
    (s) secure deletion   (t) no tail-merging   (u) undeletable
    (A) no atime updates  (C) no copy on write  (S) synchronous updates 
    (D) synchronous directory updates   (T) top of directory hierarchy
	 
       ------ + ------ + ------ + ------ + ------ + ------ + ------ 	 

Use hdparm to set/get hard disk attributes
  ex: sudo hdparm -i /dev/sda
  /dev/sda:
  
   Model=ST9500420AS, FwRev=0006HPM1, SerialNo=5VJ5ZZPZ
   Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
   RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
   BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=16
   CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=976773168
   IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
   PIO modes:  pio0 pio1 pio2 pio3 pio4
   DMA modes:  mdma0 mdma1 mdma2
   UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
   AdvancedPM=yes: unknown setting WriteCache=enabled
   Drive conforms to: unknown:  ATA/ATAPI-3,4,5,6,7
				 
   * signifies the current active mode

  ex: sudo hdparm -t -T /dev/sda 
      (-T: throughput limit of the proc/mem/cache)
      (-t: throughput sustained by drive w/o FS overhead)
  /dev/sda:
   Timing cached reads:   5826 MB in  2.00 seconds = 2914.16 MB/sec
   Timing buffered disk reads: 304 MB in  3.02 seconds = 100.75 MB/sec

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

Use tune2fs to adjust tunable filesystem parameters on ext2/ext3/ext4 systems
  see man page

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

To show weirdness of filesystems:
ls -l /proc
cat /proc/zoneinfo
cat /proc/uptime

find -L CC -name tester.txt

GDT - Global Descriptor Table - describes segmentation system
IDT - Interrupt Descriptor Table - describes interrupt vector table

To see the levels of filesystem code:
/usr/src/kernels/linux-3.5.3/fs/buffer.c
/usr/src/kernels/linux-3.5.3/fs/ext4/dir.c

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

Use yum install sleuthkit to get istat
Use istat -L / to get inode information about directory /
   File: '/'
     Size: 4096            Blocks: 8          IO Block: 4096   directory
   Device: fd01h/64769d    Inode: 2           Links: 24
   Access: (0555/dr-xr-xr-x)  Uid: (    0/    root)   Gid: (    0/ root)
   Access: ...
Use sudo tune2fs -l /dev/sda2 to find first inode and inode size
   First inode:              11
   Inode size:               128
   Journal inode:            8
Use ls -i /home/ to find the inodes in /home
   524289 franco/
Use find /home -inum 524289
   /home/franco

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

debugfs may prove to be useful in finding inode info like this:
   # ls -li testfile2.txt
   818538 -rw-r--r-- 1 root root 16 2012-03-30 01:37 testfile2.txt

   sudo debugfs /dev/sdb 
   debugfs:  cat <818538>
   ---contents of file shows up---
   debugfs:  imap <796878>
      Inode 796878 is part of block group 97
      located at block 3146412, offset 0x0d00
   debugfs: stat <796878>
      Inode: 796878   Type: regular    Mode:  0644   Flags: 0x80000
      Generation: 1412622814    Version: 0x00000000:00000001
      User:  1000   Group:  1000   Size: 786722618
      File ACL: 0    Directory ACL: 0
      Links: 2   Blockcount: 1536600
        Fragment:  Address: 0    Number: 0    Size: 0
        ctime: 0x4f74e2ca:804c8b24 -- Fri Mar 30 01:31:38 2012
        atime: 0x4f734bf3:17a63304 -- Wed Mar 28 20:35:47 2012
        mtime: 0x4f21d235:1d236964 -- Fri Jan 27 00:22:45 2012
        crtime: 0x4f21cef0:7c817964 -- Fri Jan 27 00:08:48 2012
        Size of extra inode fields: 28
      EXTENTS:
        (0-4095): 9412608-9416703, (4096-20479): 9420800-9437183,
        (20480-20507): 9484288-9484315, (20508-20515): 9484316-9484323,
        (20516-20519): 9484324-9484327, (20520-205312...
   debugfs: ex <796878>
      Level Entries         Logical            Physical Length Flags
         0/ 1   1/  4      0 -  68095  9538837             68096
         1/ 1   1/ 32      0 -   4095  9412608 -  9416703   4096 
         1/ 1   2/ 32   4096 -  20479  9420800 -  9437183  16384 
         1/ 1   3/ 32  20480 -  20507  9484288 -  9484315     28 
         1/ 1   4/ 32  20508 -  20515  9484316 -  9484323      8 
         1/ 1   ...

       ------ + ------ + ------ + ------ + ------ + ------ + ------ 

e2tools might be useful read through all blocks of a file via inodes.
 e2cp   - copies files from/to an e2fs filesystem
 e2ln   - create hard links on an ext2 filesystem
 e2ls   - list files and directories on an ext2 filesystem
 e2mkdir - creates a directory on an ext2 filesystem
 e2mv   - moves or renames files on an ext2fs filesystem
 e2rm   - removes files and directories on an ext2 filesystem
 e2tail - a basic version of the tail command for an ext2 filesystem


e2fsprogs - make sure -devel is installed too
 chattr     - change file attributes on a Linux file system
 lsattr     - list file attributes on a Linux second extended file system
 badblocks  - search a device for bad blocks
 debugfs    - ext2/ext3/ext4 file system debugger
 dumpe2fs   - dump ext2/ext3/ext4 filesystem information
 e2freefrag - report free space fragmentation information
 e2fsck     - check a Linux ext2/ext3/ext4 file systemx
 e2image    - Save critical ext2/ext3/ext4 filesystem metadata to a file
 e2label    - Change the label on an ext2/ext3/ext4 filesystem
 e2undo     - Replay an undo log for an ext2/ext3/ext4 filesystem
 e4defrag   - online defragmenter for ext4 filesystem
 filefrag   - report on file fragmentation
 fsck.extX  - check a Linux ext2/ext3/ext4 file system
 logsave    - logsave - save the output of a command in a logfile
 mke2fs     - create an ext2/ext3/ext4 filesystem
 mklost+found - 
 resize2fs  - ext2/ext3/ext4 file system resizer
 tune2fs    - adjust fs parameters


sleuthkit
 blkcalc  - Converts between unallocated disk unit numbers and regular numbers
 blkcat   - Display the contents of file system data unit in a disk image
 blkls    - List or output file system data units
 blkstat  - Display details of a block or sector
 ffind    - Finds the name of the file or directory using a given inode
 fiwalk   - Print the file system statistics and exit
 fls      - List file and directory names in a disk image
 fsstat   - Display general details of a file system
 hfind    - Lookup a hash value in a hash database
 icat     - Output the contents of a file based on its inode number
 ifind    - Find meta-data structure corresp. to a given disk unit or file name
 ils      - List inode information
 img_cat  - Output contents of an image file
 img_stat - Display details of an image file
 istat    - Display contents of an inode
 jcat     - Show the contents of a block in the file system journal
 jls      - List the contents of a file system journal
 jpeg_extract - 
 mactime  - Create an ASCII time line of file activity
 mmcat    - Output the contents of a partition to stdout
 mmls     - Display the partition  layout of a volume system
 mmstat   - Display details about the volume system
 sigfind  - Find a binary signature in a file
 sorter   - Sort files in an image into categories based on file type
 srch_strings - 
 tsk_comparedir - Compare contents of a directory with contents of image or dev
 tsk_gettimes   - Collect MAC times from a disk image into a body file
 tsk_loaddb     - populate a SQLite database with metadata from a disk image
 tsk_recover    - Export files from an image into a local directory