Yields entries in the form of "/dev/hda1" etc. Use this if you are on a new system and don't know how the storage hardware (ide, sata, scsi, usb - with ever changing descriptors) is connected and which partitions are available. Far better than using "fdisk -l" on guessed device descriptors. Show Sample Output
Shows the UUID of the given partition (here /dev/sda7). Doesn't need to be root. Show Sample Output
Suppose you made a backup of your hard disk with dd: dd if=/dev/sda of=/mnt/disk/backup.img This command enables you to mount a partition from inside this image, so you can access your files directly. Substitute PARTITION=1 with the number of the partition you want to mount (returned from sfdisk -d yourfile.img). Show Sample Output
See size of partitions as human readable and get extra informations about hdd and partitions Show Sample Output
Instead of calculating the offset and providing an offset option to mount, let lomount do the job for you by just providing the partition number you would like to loop mount.
Shows all block devices in a tree with descruptions of what they are.
It is the same but more faster real 0m0,007s user 0m0,011s sys 0m0,000s with my solution real 0m0,038s user 0m0,044s sys 0m0,000s with your solution :) Show Sample Output
Reports all local partitions having more than 90% usage. Just add it in a crontab and you'll get a mail when a disk is full. (sending mail to the root user must work for that) Show Sample Output
The above command assumes the lost data is on /dev/sda and you previously issued the following command to mount _another_ disk or partition (/dev/sdb1) on /recovery
sudo mount /dev/sdb1 /recovery
If you don't do this, the data could be overwrited!
foremost is a very powerful carving tool. By default foremost recovers all known file types. If you want to reduce the amount of files that are recovered you can specify the file type you are looking for. Read the man page to know the available file types.
i.e to recover JPEG pictures append to foremost the switch -tjpg
Necessary for fsck for example. The remount functionality follows the standard way how the mount command works with options from fstab. It means the mount command doesn't read fstab (or mtab) only when a device and dir are fully specified. After this call all old mount options are replaced and arbitrary stuff from fstab is ignored, except the loop= option which is internally generated and maintained by the mount command. It does not change device or mount point.
`blkid` is an interface to libuuid - it can read Device Mapper, EVMS, LVM, MD, and regular block devices. -c /dev/null - Do not use cached output from /etc/blkid.tab or /etc/blkid/blkid.tab (RHEL) -i - Display I/O Limits (aka I/O topology) information (not available in RHEL) -p - Low-level superblock probing mode (not available in RHEL) Show Sample Output
lsblk | grep mountpoint Show Sample Output
Use lsbk (list block) and jq (to manipulate a JSON on the command line) to display partition information: Show Sample Output
To get most of you HDD/SSD driver you need to make sure you partition are aligned, if not the speed penalty can be up to 50% slower! this simple one liner will check to see if each partition start sector is divided by 512 you need to change sda with your driver if you find the one of your partitions is not aligned use gparted to move the start sector of the partition to be divided of 512 Show Sample Output
Show the UUID-based alternate device names of ZEVO-related partitions on Darwin/OS X. Adapted from the lines by dbrady at http://zevo.getgreenbytes.com/forum/viewtopic.php?p=700#p700 and following the disk device naming scheme at http://zevo.getgreenbytes.com/wiki/pmwiki.php?n=Site.DiskDeviceNames Show Sample Output
XX is your device partition number like /dev/sdc1 .
to see how many inodes your partition have type:
df --inodes (or df -i)
Default formatting with ext4 would create small inode count for the new partition
if you need big count of inodes is the fstype news the correct one.
in debian you can see which fstype exists as template in:
vim /etc/mke2fs.conf
if you format default ext for a partition size with 1TB you would get 1 Million inodes (not enough for backupStorages)
but if you format with fstype news you would get hunderd of millions of inodes for the partition.
you have tune
/etc/sysctl.conf
also with following sysconfig parameters
fs.file-max = XXX
fs.nr_open = XXX
where XXX is the count of max inodes for whole system
Creates a single primary partition starting at sector 0 and extending to the end of the disk. Use with care.
Another alternative to blkid, lsblk, file -s, cat /proc/paritions, fdisk -l, etc.. Show Sample Output
List all disks and all of their partitions on OS X. http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/diskutil.8.html Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: