Unix and Linux Filesystems
[Berkeley BSD style]
/usr/local -> packages
installed locally, i.e. Apache, but whish are not part of the OS distribution
/usr/local/bin -> custom scripts
[Solaris style]
/opt -> optional
packages, i.e. Oracle
The System V style is
4-CHARACTER VENDOR NAME followed by package name
i.e. SUNWwbsvr
The BSD style is
[root@grasshopper root]# df
-h
Filesystem Size
Used Avail Use% Mounted on
/dev/sda5
2.4G 141M 2.1G 7% /
/dev/sda1 99M
9.3M 85M 10% /boot
/dev/sda8
1.2G 638M 484M 57% /home
/dev/sda6
2.0G 33M 1.8G 2% /opt
none 378M
0 378M 0% /dev/shm
/dev/sda9 819M
705M 73M 91% /tmp
/dev/sda2
4.9G 4.1G 472M 90% /usr
/dev/sda3 3.4G
1.3G 2.0G 40% /usr/local
/dev/sda7
1.8G 1.1G 558M 67% /var
[root@grasshopper root]#
[root@grasshopper root]#
[root@grasshopper root]# fdisk /dev/sda
The number of cylinders for this disk is set to 2213.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 18.2 GB, 18210036736
bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device
Boot Start End Blocks
Id System
/dev/sda1 * 1 13
104391 83 Linux
/dev/sda2
14 650 5116702+ 83 Linux
/dev/sda3 651 1096
3582495 83 Linux
/dev/sda4 1097 2213
8972302+ f Win95 Ext'd (LBA)
/dev/sda5 1097 1402
2457913+ 83 Linux
/dev/sda6 1403 1657
2048256 83 Linux
/dev/sda7 1658
1886 1839411 83 Linux
/dev/sda8 1887
2039 1228941 83 Linux
/dev/sda9 2040
2145 851413+ 83 Linux
/dev/sda10 2146
2212 538146 82 Linux swap
Command (m for help): q
[root@grasshopper root]#
[root@grasshopper root]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders
for this disk is set to 2213.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help):
p
Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device
Boot Start End Blocks
Id System
Command (m for help):
m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2213, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2213, default 2213): 13
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (14-2213, default 14): 14
Last cylinder or +size or +sizeM or +sizeK (14-2213, default 2213): 650
Command (m for help): p
Disk /dev/sdb: 18.2 GB, 18210036736
bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device
Boot Start End Blocks
Id System
/dev/sdb1
1 13 104391
83 Linux
/dev/sdb2 14
650 5116702+ 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (651-2213, default 651):
Using default value 651
Last cylinder or +size or +sizeM or +sizeK (651-2213, default 2213): 1096
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition
table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@grasshopper root]#
[root@grasshopper root]#
[root@grasshopper root]# fdisk /dev/sdb
The number of cylinders for
this disk is set to 2213.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot
Start End Blocks
Id System
/dev/sdb1
1 13 104391
83 Linux
/dev/sdb2 14
650 5116702+ 83 Linux
/dev/sdb3 651 1096
3582495 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Selected partition 4
First cylinder (1097-2213, default 1097):
Using default value 1097
Last cylinder or +size or +sizeM or +sizeK (1097-2213, default 2213):
Using default value 2213
Command (m for help):
n
First cylinder (1097-2213, default 1097):
Using default value 1097
Last cylinder or +size or +sizeM or +sizeK (1097-2213, default 2213): 1402
Command (m for help): p
Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device
Boot Start End Blocks
Id System
/dev/sdb1 1
13 104391
83 Linux
/dev/sdb2 14
650 5116702+ 83 Linux
/dev/sdb3 651 1096
3582495 83 Linux
/dev/sdb4 1097
2213 8972302+ 5 Extended
/dev/sdb5 1097
1402 2457913+ 83 Linux
Command (m for help):
n
First cylinder (1403-2213, default 1403):
Using default value 1403
Last cylinder or +size or +sizeM or +sizeK (1403-2213, default 2213): 1657
Command (m for help): n
First cylinder (1658-2213, default 1658):
Using default value 1658
Last cylinder or +size or +sizeM or +sizeK (1658-2213, default 2213): 1886
Command (m for help): n
First cylinder (1887-2213, default 1887):
Using default value 1887
Last cylinder or +size or +sizeM or +sizeK (1887-2213, default 2213): 2039
Command (m for help): n
First cylinder (2040-2213, default 2040):
Using default value 2040
Last cylinder or +size or +sizeM or +sizeK (2040-2213, default 2213): 2145
Command (m for help): n
First cylinder (2146-2213, default 2146):
Using default value 2146
Last cylinder or +size or +sizeM or +sizeK (2146-2213, default 2213): 2212
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition
table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@grasshopper root]#
[root@grasshopper root]#
[root@grasshopper root]#
[root@grasshopper root]# fdisk /dev/sdb
The number of cylinders for
this disk is set to 2213.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 18.2 GB, 18210036736
bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device
Boot Start End
Blocks Id System
/dev/sdb1 1
13 104391
83 Linux
/dev/sdb2 14
650 5116702+ 83
Linux
/dev/sdb3 651
1096 3582495 83 Linux
/dev/sdb4 1097
2213 8972302+ 5 Extended
/dev/sdb5 1097
1402 2457913+ 83 Linux
/dev/sdb6 1403
1657 2048256 83 Linux
/dev/sdb7 1658
1886 1839411 83 Linux
/dev/sdb8 1887 2039
1228941 83 Linux
/dev/sdb9 2040
2145 851413+ 83 Linux
/dev/sdb10 2146
2212 538146 83 Linux
Command (m for help): q
[root@grasshopper root]#
[root@grasshopper root]#
[root@grasshopper root]# fdisk /dev/sdb
The number of cylinders for
this disk is set to 2213.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): t
Partition number (1-10): 4
Hex code (type L to list codes): f
Changed system type of partition 4 to f (Win95 Ext'd (LBA))
Command (m for help): p
Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start
End Blocks Id System
/dev/sdb1 1
13 104391
83 Linux
/dev/sdb2 14
650 5116702+ 83
Linux
/dev/sdb3 651
1096 3582495 83 Linux
/dev/sdb4 1097
2213 8972302+ f Win95 Ext'd (LBA)
/dev/sdb5 1097
1402 2457913+ 83 Linux
/dev/sdb6 1403
1657 2048256 83 Linux
/dev/sdb7 1658
1886 1839411 83 Linux
/dev/sdb8 1887 2039
1228941 83 Linux
/dev/sdb9 2040
2145 851413+ 83 Linux
/dev/sdb10 2146
2212 538146 83 Linux
Command (m for help):
q
[root@grasshopper root]#
[root@grasshopper root]#
return
to top
home
Copyright © billhance.com. All rights reserved.