The output is like that of du, so you get the recursive output of every subfolder. # change /home to match the folder your interested in, change it to . for currentRead More…
Linux view difference in files every N seconds – with find & diff or comm
If your copying files using cp or rsync or whatever method. Sometimes you want to see the new files or changed files in the past N seconds. You can do that likeRead More…
IFS cheatsheet – setting to default & to newline (for files & folders with spaces)
IFS Cheatsheet The IFS variable is the for loop delimiter. By default its set to space,tab,newline (first spaces are looked at as delimiters, and then tabs, and then newlines). This will causeRead More…
Btrfs Restore Path-regex (regular expressions) how to/examples
INTRO BTRFS RESTORE: runs thru the specified filesystem and tries to restore files and folders. Useful if the filesystem is not mountable. Here we will explore using different regular expression to dumpRead More…
BTRFS restoring a corrupt filesystem from another “tree location”
CAUTION: before you continue, im not responsible for any data loss that these steps might cause you. everyone should have a backup of their data. Here is how you restore a reallyRead More…
Mapping ATA or SCSI HOST to Device Name
Mapping ATA to Device Name source: http://superuser.com/questions/617192/mapping-ata-device-number-to-logical-device-name/938620#938620 source: http://www.phuket-data-wizards.com/blog/2011/07/16/matching-linux-ata-numbers-to-the-device-names/comment-page-1/#comment-164108 First Get the ata # (maybe its from some error message that you see in dmesg) The ata # is the unique_id withRead More…
Add remove scsi SD and SG drives
source: http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-4.html To remove a drive from “cat /proc/partitions” similar to article here echo “scsi remove-single-device a b c d” > /proc/scsi/scsi echo “scsi add-single-device a b c d” > /proc/scsi/scsi a ==Read More…
How to find out if a drive is bad using SMART. smartmontool’s SMARTCTL command
In linux there is a tool called SMARTCTL which talks to the SMART modules on disks. Most current drives come with SMART. Its a chip on a disk that keeps diagnostics onRead More…
Units of Information, Data Storage – SI vs IEC – 1000 base vs 1024 base
Most people dont understand, and dont really care to understand (as it doesnt affect them) the difference between a KiB and a kB. To them its all a kilobyte. you might ofRead More…
3 ways to copy with RSYNC: file, rsync over ssh, rsync daemon
Rsync command can be launched in one of two ways – this gives the option of 3 different ways to launch rsync transfer, here is how. rsync command can be used as aRead More…