-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcheck.sh
More file actions
executable file
·52 lines (42 loc) · 1.05 KB
/
check.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
#
# Author: Ramon Antonio Parada <ramon@bigpress.net>
#
#export i=1171440236
#export j=1171440299
#
#b = (int)((L-S)*512/B)
# b = (314028801 - 67252224) * 512 / 4096
# b = 30847072
#b = File System block number
#B = File system block size in bytes
#L = LBA of bad sector
#S = Starting sector of partition as shown by fdisk -lu
#and (int) denotes the integer part.
root@neonlight:/home/rap/Dropbox/Scripts# debugfs
debugfs 1.41.9 (22-Aug-2009)
debugfs: open /dev/sda2
debugfs: testb 30847072
Block 30847072 marked in use
debugfs: icheck 30847072
Block Inode number
30847072 15417349
debugfs: ncheck 15417349
Inode Pathname
15417349 /home/rap/.kde/share/apps/ktorrent/log
(314028825 - 67252224) * 512 / 4096 =30847075
debugfs: testb 30847075
Block 30847075 marked in use
debugfs: icheck 30847075
Block Inode number
30847075 15417349
debugfs: ncheck 15417349
Inode Pathname
15417349
export j=314028801
export i=314028701
while [ $i != $j ]
do echo $i
dd if=/dev/sda of=/dev/null bs=512 count=1 skip=$i
let i+=1
done