blkid
Validate fstab syntax http://serverfault.com/questions/174181/how-do-you-validate-fstab-without-rebooting#509014.
mount --verbose --all --fake
mkfs.ext2 -L fs_boot /dev/sde1
Format usb to fat32 (a-la mkdosfs)
mkfs.vfat -F 32 /dev/sdg1
mkfs.ext4 -N 1000432 /dev/sda5
http://stackoverflow.com/questions/3618820/how-many-bytes-per-inodes.
tune2fs -l /dev/sda5 | grep Inode
df -hi
du -sh ./*/
-
http://superuser.com/questions/9847/linux-utility-for-finding-the-largest-files-directories
-
http://cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/
-
http://cyberciti.biz/faq/find-large-files-linux/
du --all /var/log | sort --numeric-sort --reverse | head --lines=20 du --human-readable --one-file-system ./ | grep --extended-regexp ^[0-9.,]+[MG] find -ctime +30 -daystart -type d
| xargs du -b 2>/dev/null
| awk '{total += $1; print $0} END{print total}'
ls -l /dev/disk/by-uuid | grep sda1
-
dd if=/dev/your-source1 of=/dev/your-destination1 bs=512 conv=sync
resize2fs /dev/sda99
Copy from cd-rom disc to ISO image
dd if=/dev/cdrom of=myimage.iso
Copy ISO image to bootable usb
dd if=path/to/your.iso of=/dev/your-usb
https://haydenjames.io/web-host-doesnt-want-read-benchmark-vps
dd if=/dev/zero of=/tmp/foobar bs=1M count=1024 conv=fdatasync
dd if=/dev/sdb of=mybackup.img bs=130M count=1
dd if=bootldr.rom of=/dev/sdb
dd if=debian-eeepc.img of=/dev/sdf
dustshow disk space usage, is an du replacement https://github.com/bootandy/dustdiskonautterminal disk space navigator https://github.com/imsnif/diskonautncdushow disk space usage, is anbaobabandgt5replacement https://dev.yorhel.nl/ncdu
ddhhttps://github.com/darakian/ddh. PROS: Rust.fcloneshttps://github.com/pkolaczk/fclones. PROS: Rust.fdupeshttps://github.com/adrianlopezroche/fdupes. PROS: C.jdupeshttps://github.com/jbruchon/jdupes. PROS: C.rdfindhttps://github.com/pauldreik/rdfind. PROS: C++.rmlinthttps://github.com/sahib/rmlint. PROS: C.- https://github.com/justinhj/justinhj-emacs-utils emacs dired
- http://justinsboringpage.blogspot.ru/2011/06/finding-duplicate-files-in-dired-buffer.html emacs dired
- https://www.emacswiki.org/emacs/RemoveDuplicateFiles emacs dired
blkid
mount /dev/sr0 path/to/mnt
https://askubuntu.com/questions/69363/mount-single-partition-from-image-of-entire-disk-device#69447
Get the sector size and the sector start of the partition:
# fdisk -lu path/to/image.raw
Disk path/to/image.raw: 90 GiB, 96636764160 bytes, 188743680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000b7568
Device Boot Start End Sectors Size Id Type
path/to/image.raw1 2048 63487 61440 30M 82 Linux swap / Solaris
path/to/image.raw2 * 63488 188743678 188680191 90G 83 Linux
Calculate the offset from the start of the image to the partition start
multiplying sector size to sector start: 512 * 63488 = 32505856
Mount partition on loop devices:
losetup -o 32505856 /dev/loop0 path/to/image.raw
Mount partition on file system:
mount /dev/loop0 /mnt/image_raw
https://github.com/adrianlopezroche/fdupes, https://unix.stackexchange.com/questions/71176/find-duplicate-files#71178
fdupes --recurse .
https://unix.stackexchange.com/questions/71176/find-duplicate-files#71201
/usr/share/fslint/fslint/findup ./
Check/clean disk after reboot
touch /forcefsck
fdisk /dev/sda
n
t 7
mkfs.exfat /dev/sda1
bchunk Dungeon_Keeper.BIN Dungeon_Keeper.cue Dungeon_Keeper.iso
modprobe loop && mount -t iso9660 -o loop tmp/fdfullcd.iso mnt/iso
mount -t vfat /dev/sdc1 mnt/usbdisk/ \
-o uid=danil,gid=danil,nosuid,shortname=mixed,umask=077
mount -t ext2 ~/restore.img /mnt/img -o ro,loop,offset=32256
mount -t cifs "//192.168.91.3/store (e)" mnt/black_server/ \
-o "workgroup=darout,username=danil,iocharset=utf8,codepage=cp1251"
mount --rbind olddir newdir
fsck /dev/sdg1