Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printf "BIL" > /tmp/BIL
- dd of=/tmp/sparse bs=1 count=0 seek=10
- dd if=/tmp/BIL of=/tmp/sparse bs=1 count=3 seek=10
- dd if=/tmp/BIL of=/tmp/sparse bs=1 count=3 seek=17
- dd of=/tmp/sparse bs=1 count=0 seek=30
- dd if=/tmp/BIL of=/tmp/sparse bs=1 count=3 seek=30
- %>hexdump sparse
- 0000000 0000 4942 004c 0000 0000 4942 004c 0000
- 0000010 4200 4c49 0000 0000 0000 0000 0000 4942
- 0000020 004c
- 0000021
- %>cat sparse
- BILBILBILBIL%
- %>ls -ls /tmp/sparse
- 8.0K -rw-r--r--. 1 bil bil 33 May 26 14:17 /tmp/sparse
- %>dd of=/tmp/sparse bs=1 count=0 seek=5
- %>hexdump sparse
- 0000000 0000 4942 004c
- 0000005
- dd if=/tmp/BIL of=/tmp/sparse seek=1000
- ls -ls /tmp/sparse
- st_size; /* total size, in bytes */
- blkcnt_t st_blocks; /* number of 512B blocks allocated */
- $ sudo hdparm --fibmap ~/sparse
- filesystem blocksize 4096, begins at LBA 25167872; assuming 512 byte sectors.
- byte_offset begin_LBA end_LBA sectors
- 512000 226080744 226080751 8
- $ sudo debugfs /dev/sda3
- debugfs: stat <1040667>
- Inode: 1040667 Type: regular Mode: 0644 Flags: 0x0
- Generation: 1161905167 Version: 0x00000000
- User: 127 Group: 500 Size: 335360
- File ACL: 0 Directory ACL: 0
- Links: 1 Blockcount: 664
- Fragment: Address: 0 Number: 0 Size: 0
- ctime: 0x4dd61e6c -- Fri May 20 09:55:24 2011
- atime: 0x4dd61e29 -- Fri May 20 09:54:17 2011
- mtime: 0x4dd61e6c -- Fri May 20 09:55:24 2011
- Size of extra inode fields: 4
- BLOCKS:
- (0-11):4182714-4182725, (IND):4182726, (12-81):4182727-4182796
- TOTAL: 83
- $ dd of=/var/tmp/sparse if=/dev/zero count=1
- $ dd of=/var/tmp/sparse if=/dev/zero seek=1000 count=1
- $ filefrag -v /var/tmp/sparse
- Filesystem type is: ef53
- File size of /var/tmp/sparse is 512512 (126 blocks of 4096 bytes)
- ext: logical_offset: physical_offset: length: expected: flags:
- 0: 0.. 0: 3441408.. 3441408: 1:
- 1: 125.. 125: 3441533.. 3441533: 1: 3441409: last,eof
- /var/tmp/sparse: 2 extents found
Add Comment
Please, Sign In to add comment