Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=====begin of copyright notice=====
- copyright()
- {
- echo -e "
- THE AULIX_UTILS FOR DEBIAN AND CENTOS \n
- The AUTHOR of this file is Alexander Borisovich Prokopyev, Kurgan, Russia \n
- More info can be found at the AUTHOR's website: http://www.aulix.com/resume \n
- Contact: alexander.prokopyev at aulix dot com \n
- Copyright (c) Alexander Prokopyev, 2006-2014 \n
- All materials contained in this file are protected by copyright law. \n
- Nobody except the AUTHOR may alter or remove this copyright notice from copies of the content. \n
- The AUTHOR allows to use this content under AGPL v3 license:
- http://opensource.org/licenses/agpl-v3.html
- ";
- }
- copyright;
- #=====end of copyright notice=====
- show_partitions()
- {
- DevPart=$(mount | grep "on / type" | awk '{ print $1 }');
- #Extract ../../sdXN part:
- Dev=$(ls -al $DevPart | awk '{ print $11 }');
- #Extract pure sdXN:
- Dev=$(perl -e 'my $S="'$Dev'"; $S =~ s/^(?P<Before>[.\/]*)(?P<Dev>sd.)\d$/$+{Dev}/; print $S;');
- echo "===== sfdisk: ";
- sfdisk -d /dev/$Dev;
- echo "===== /dev/disk: ";
- ls -al /dev/disk/by-id/;
- ls -al /dev/disk/by-uuid/;
- echo "===== /proc/partitions: ";
- cat /proc/partitions;
- # echo "===== /utils/disk/info.sh: ";
- # /utils/disk/info.sh;
- }
- lsblk --output name,MOUNTPOINT,SIZE,model,TYPE,PHY-SEC,LOG-SEC,MIN-IO,OPT-IO;
- echo "===============================================================================================";
- di | sort;
- echo "===============================================================================================";
- show_partitions;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement