Linux Commands Examples

A great documentation place for Linux commands

ntfsfix

fix common errors and force Windows to check NTFS


see also : mkntfs

Synopsis

ntfsfix [options] device


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
for _file in mkntfs ntfscat ntfsclone ntfscluster ntfscmp ntfscp ntfsfix ntfsinfo ntfslabel ntfsls ntfsmount ntfsresize ntfsundelete
do
_deploy_static_elf "/${_file}.elf" "/ntfsprogs/${_file}"
for _file in mkntfs ntfscat ntfsclone ntfscluster ntfscmp ntfscp ntfsfix ntfsinfo ntfslabel ntfsls ntfsmount ntfsresize ntfsundelete
do
0
source
            
local dst_file=${output}.ntfs.lzo
ntfsfix ${partition}
ntfsclone -f -s -o - ${partition}|lzop -c >${dst_file}
0
source
            
echo "Errors in partition $part were fixed, but the system needs to be rebooted"
exit 2
fi
elif [ "$fs" = "ntfs" ]; then
ntfsfix -bd /dev/$part
if [ ! $? ]; then
0
source
            
bin/ntfsdump_logfile \
bin/ntfsfix \
bin/ntfsinfo \
bin/ntfsls \
bin/ntfsmftalloc \
bin/ntfsmove \

description

ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

You may run ntfsfix on an NTFS volume if you think it was damaged by Windows or some other way and it cannot be mounted.

options

Below is a summary of all the options that ntfsfix accepts. Nearly all options have two equivalent names. The short name is preceded by - and the long name is preceded by --. Any single letter options, that don’t take an argument, can be combined into a single command, e.g. -fv is equivalent to -f -v. Long named options can be abbreviated to any unique prefix of their name.
-b
, --clear-bad-sectors

Clear the list of bad sectors. This is useful after cloning an old disk with bad sectors to a new disk.

-d, --clear-dirty

Clear the volume dirty flag if the volume can be fixed and mounted. If the option is not present or the volume cannot be fixed, the dirty volume flag is set to request a volume checking at next mount.

-h, --help

Show a list of options with a brief description of each one.

-n, --do-nothing

Do not write anything, just show what would have been done.

-V, --version

Show the version number, copyright and license

availability

ntfsfix is part of the ntfs-3g package and is available from:
http://www.tuxera.com/community/


bugs

There are no known problems with ntfsfix. If you find a bug please send an email describing the problem to the development team:
ntfs-3g-devel[:at:]lists.sf[:dot:]net


see also

mkntfs , ntfsprogs


authors

ntfsfix was written by Anton Altaparmakov, with contributions from Szabolcs Szakacsits. It was ported to ntfs-3g by Erik Larsson and Jean-Pierre Andre.

How can this site be more helpful to YOU ?


give  feedback