Doing a checkdisk on one of my partition in Windows XP, it reports that there is 4KB in bad sectors.
How can I know if this bad sector belongs to a file/folder or not, and if yes which file/folder it is so I can avoid accessing it?
You can try using contain nfi.exe tool which is included in Win2K OEM support tools to identify the file that occupies a particular sector:
http://download.microsoft.com/download/win2000srv/utility/3.0/nt45/en-us/oem3sr2.zip
Nfi.exe also works on Win XP and 2003. More Info here. This is an example of output I've made on my W7 machine. Run this tool from CMD. If no switches are added - help will appear.
Use C:\nfi.exe C: >C:\output.txt to save results and search for specific sectors later. Good Luck!
badblocks -svn /dev/sda
/ /dev/sda in case you have just one disk, you can find your disks designation by runningfdisk -l