Check out the links below. Its common for drives in a RAID to fail. RAID was invented to save people from losing all of their data if a drive fails. So theRead More…
Update update-alternatives of vim to new vim – statically compiled vim
Update Alternative We will use Update Alternatives here, which is explained best by the first 2 man pages paragraphs (http://manpages.ubuntu.com/manpages/hardy/man8/update-alternatives.8.html): """ update-alternatives creates, removes, maintains and displays information about the symbolic linksRead More…
how many files in a folder – number of files&folders du
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…