LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   e2fsck and fsck.ext3 (https://www.linuxquestions.org/questions/debian-26/e2fsck-and-fsck-ext3-413469/)

kpachopoulos 02-09-2006 10:08 AM

e2fsck and fsck.ext3
 
What's the difference between them? I am almost sure, that there is no difference between them. However, fsck.ext3 is not a symlink to e2fsck, as i suspected.

satinet 02-09-2006 10:22 AM

"What's the difference between them? I am almost sure, that there is no difference between them. However, fsck.ext3 is not a symlink to e2fsck, as i suspected."


there's a huge difference in that fsck.ext3 is fsck for ext3 file systems whereas e2fsck only works on the older ext2 file system.

so their usage is entirely dependant on what file system(s) you have...

haertig 02-09-2006 10:27 AM

On my Debian box, e2fsck, fsck.ext2 and fsck.ext3 are all HARDLINKS to each other, not symlinks. fsck.jfs and jfs_fsck are also hardlinked to each other.
Code:

$ cd /sbin
$ ls -l *fsck*
-rwxr-xr-x 1 root root  45036 2005-06-15 15:27 dosfsck
-rwxr-xr-x 3 root root 130504 2005-12-10 21:13 e2fsck
-rwxr-xr-x 1 root root  18208 2005-12-10 21:13 fsck
-rwxr-xr-x 1 root root  10548 2005-12-09 14:52 fsck.cramfs
-rwxr-xr-x 3 root root 130504 2005-12-10 21:13 fsck.ext2
-rwxr-xr-x 3 root root 130504 2005-12-10 21:13 fsck.ext3
-rwxr-xr-x 2 root root 396908 2005-06-23 07:08 fsck.jfs
-rwxr-xr-x 1 root root  20420 2005-12-09 14:52 fsck.minix
lrwxrwxrwx 1 root root      7 2005-11-13 22:41 fsck.msdos -> dosfsck
-rwxr-xr-x 1 root root    413 2005-11-19 07:09 fsck.nfs
-rwxr-xr-x 1 root root 285672 2005-08-18 05:23 fsck.reiser4
lrwxrwxrwx 1 root root      7 2005-11-13 22:41 fsck.vfat -> dosfsck
-rwxr-xr-x 1 root root  2604 2005-11-16 15:36 fsck.xfs
-rwxr-xr-x 2 root root 396908 2005-06-23 07:08 jfs_fsck
-rwxr-xr-x 1 root root 200748 2005-06-23 07:08 jfs_fscklog
$


satinet 02-09-2006 10:46 AM

it might be the same binary, but it a like a different bit of the same penknife eh.....

why would you even consider running an ext2 check on ext3 file system?? lol. whatever floats your boat!

haertig 02-09-2006 11:29 AM

Quote:

Originally Posted by satinet
why would you even consider running an ext2 check on ext3 file system?? lol. whatever floats your boat!

You do realize that ext3 is nothing more than ext2 with a journal, don't you???!!!

You can certainly use ext2 tools on an ext3 filesystem. It's done all the time. You want to resize an ext3 filesystem? There is no "resize3fs" command. You use "resize2fs". The fsck commands for ext2 and ext3 are identical as the illustration below shows:
Code:

$ cmp /sbin/fsck.ext2 /sbin/fsck.ext3
$ echo $?
0
$

Compare the above output from cmp (nonexistant output, since the files are identical) to the output from cmp for two files that are clearly different:
Code:

$ cmp /sbin/fsck.ext2 /sbin/fsck.reiser4
/sbin/fsck.ext2 /sbin/fsck.reiser4 differ: byte 25, line 1
$ echo $?
1
$



All times are GMT -5. The time now is 07:25 AM.