Skip to content

Instantly share code, notes, and snippets.

@slacy
Created August 29, 2012 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slacy/3519255 to your computer and use it in GitHub Desktop.
Save slacy/3519255 to your computer and use it in GitHub Desktop.
$ dd if=/dev/zero of=./small.ext4 bs=1000000 count=100
$ dd if=/dev/zero of=./medium bs=1000000 count=50
$ mkfs.ext4 ./small.ext4
$ sudo mkdir /mnt/tmp
$ sudo mount -o loop ./small.ext4 /mnt/tmp
$ sudo chmod a+rxw /mnt/tmp
$ sftp localhost
sftp> put medium /mnt/tmp/a
sftp> put medium /mnt/tmp/b
sftp> put medium /mnt/tmp/b
$ ls -la /mnt/tmp
drwxrwxrwx 3 root root 1024 Aug 29 14:33 .
drwxr-xr-x 6 root root 4096 Aug 29 11:07 ..
-rw-rw-r-- 1 slacy slacy 50000000 Aug 29 14:33 a
-rw-rw-r-- 1 slacy slacy 36032512 Aug 29 14:33 b
-rw-rw-r-- 1 slacy slacy 0 Aug 29 14:33 c
drwx------ 2 root root 12288 Aug 29 11:07 lost+found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment