Sie sind auf Seite 1von 2

Useful linux commands df -h http://linux.about.com/od/commands/a/blcmdl1_dfx.

htm The df command, which stands for "disk filesystem", shows a summary of the available and used disk space on your Linux system. With the -h option it shows the disk space in "human readable" form, which in this case means, it gives you the units along with the numbers. For example, df -h will output a table with four columns. The first column contains the file system path, which can be a reference to a hard disk or another storage device, or a file system connected through the network. The second column shows the capacity of that file system. The third column shows the available space, and the last column shows the path on which that file system is mounted. The mount point is the place in the directory tree where you can find and access the file system. fdisk -l http://www.thegeekstuff.com/2010/09/linux-fdisk/ On Linux distributions, fdisk is the best tool to manage disk partitions. fdisk is a text based utility. Using fdisk you can create a new partition, delete an existing partition, or change existing partition. Using fidsk you are allowed to create a maximum of four primary partition, and any number of logical partitions, based on the size of the disk. Keep in mind that any single partition requires a minimum size of 40MB. In this article, let us review how to use fdisk command using practical examples. Warning: Dont delete, modify, or add partition, if you dont know what you are doing. You will lose your data!

1. View All Existing Disk Partitions Using fdisk -l


Before you create a new partition, or modify an existing partition, you might want to view all available partition in the system. Use fdisk -l to view all available partitions as shown below.
# fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0xf6edf6ed Device Boot /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 * /dev/sda6 /dev/sda7 /dev/sda8 /dev/sda9 Start 1 1960 5284 6529 1960 2662 2905 3148 3265 End 1959 5283 6528 9729 2661 2904 3147 3264 5283 Blocks 15735636 26700030 10000462+ 25712032+ 5638752 1951866 1951866 939771 16217586 Id c f 7 c 83 83 83 82 b System W95 FAT32 (LBA) W95 Ext'd (LBA) HPFS/NTFS W95 FAT32 (LBA) Linux Linux Linux Linux swap / Solaris W95 FAT32

The above will list partitions from all the connected hard disks. When you have more than one disk on the system, the partitions list are ordered by the devices /dev name. For example, /dev/sda, /dev/sdb, /dev/sdc and so on.

Das könnte Ihnen auch gefallen