/l3/users/eb/2009/linux3/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 |
|
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) |
#echo ';' | sfdisk /dev/sdb
Checking that no-one is using this disk right now ... OK Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 38912 38913- 312568641 7 HPFS/NTFS /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty ... /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#echo ';' | sfdisk /dev/sdb
Checking that no-one is using this disk right now ... OK Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 38912 38913- 312568641 7 HPFS/NTFS /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty ... /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#fdisk /dev/sdb
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT 10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/ 11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b 12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor 14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor ... 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): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk /dev/sdb
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs f W95 Ext'd (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT 10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/ 11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b 12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor 14 Hidden FAT16 <3 61 SpeedStor a9 NetBSD f4 SpeedStor ... 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): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk /dev/sdb
Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 * 1 1 0 0 Empty Partition 1 does not end on cylinder boundary. Command (m for help): n Command action e extended p primary partition (1-4) p ... 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): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk /dev/sdb
Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 * 1 1 0 0 Empty Partition 1 does not end on cylinder boundary. Command (m for help): n Command action e extended p primary partition (1-4) p ... 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): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1246 10008463+ 83 Linux /dev/sdb2 1247 2463 9775552+ 83 Linux /dev/sdb3 2464 4896 19543072+ 5 Extended /dev/sdb5 2464 3680 9775521 83 Linux /dev/sdb6 3681 4896 9767488+ 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1246 10008463+ 83 Linux /dev/sdb2 1247 2463 9775552+ 83 Linux /dev/sdb3 2464 4896 19543072+ 5 Extended /dev/sdb5 2464 3680 9775521 83 Linux /dev/sdb6 3681 4896 9767488+ 83 Linux |
#echo ';' | sfdisk /dev/sdb
Checking that no-one is using this disk right now ... OK Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 0+ 1245 1246- 10008463+ 83 Linux /dev/sdb2 1246 2462 1217 9775552+ 83 Linux /dev/sdb3 2463 4895 2433 19543072+ 5 Extended /dev/sdb4 0 - 0 0 0 Empty ... /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#echo ';' | sfdisk /dev/sdb
Checking that no-one is using this disk right now ... OK Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 0+ 1245 1246- 10008463+ 83 Linux /dev/sdb2 1246 2462 1217 9775552+ 83 Linux /dev/sdb3 2463 4895 2433 19543072+ 5 Extended /dev/sdb4 0 - 0 0 0 Empty ... /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#!f
fdisk -l /dev/sdb Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#!f
fdisk -l /dev/sdb Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#fdisk /dev/sdb
The number of cylinders for this disk is set to 38913. 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): n Command action e extended p primary partition (1-4) ... Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 4867 19543072+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk /dev/sdb
The number of cylinders for this disk is set to 38913. 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): n Command action e extended p primary partition (1-4) ... Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 4867 19543072+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 2009-05-30 11:54 /dev/sdb brw-rw---- 1 root disk 8, 17 2009-05-30 11:54 /dev/sdb1 brw-rw---- 1 root disk 8, 18 2009-05-30 11:54 /dev/sdb2 brw-rw---- 1 root disk 8, 19 2009-05-30 11:54 /dev/sdb3 brw-rw---- 1 root disk 8, 21 2009-05-30 11:54 /dev/sdb5 brw-rw---- 1 root disk 8, 22 2009-05-30 11:54 /dev/sdb6 |
#ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 2009-05-30 11:54 /dev/sdb brw-rw---- 1 root disk 8, 17 2009-05-30 11:54 /dev/sdb1 brw-rw---- 1 root disk 8, 18 2009-05-30 11:54 /dev/sdb2 brw-rw---- 1 root disk 8, 19 2009-05-30 11:54 /dev/sdb3 brw-rw---- 1 root disk 8, 21 2009-05-30 11:54 /dev/sdb5 brw-rw---- 1 root disk 8, 22 2009-05-30 11:54 /dev/sdb6 |
#apt-get install parted
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libparted1.8-10 Suggested packages: libparted1.8-dev libparted1.8-i18n parted-doc ... Get:2 http://127.0.0.1 sid/main parted 1.8.8.git.2008.03.24-11.1 [64.5kB] Fetched 262kB in 0s (1766kB/s) Selecting previously deselected package libparted1.8-10. (Reading database ... 54675 files and directories currently installed.) Unpacking libparted1.8-10 (from .../libparted1.8-10_1.8.8.git.2008.03.24-11.1_i386.deb) ... Selecting previously deselected package parted. Unpacking parted (from .../parted_1.8.8.git.2008.03.24-11.1_i386.deb) ... Processing triggers for man-db ... Setting up libparted1.8-10 (1.8.8.git.2008.03.24-11.1) ... Setting up parted (1.8.8.git.2008.03.24-11.1) ... |
#apt-get install parted
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libparted1.8-10 Suggested packages: libparted1.8-dev libparted1.8-i18n parted-doc ... Get:2 http://127.0.0.1 sid/main parted 1.8.8.git.2008.03.24-11.1 [64.5kB] Fetched 262kB in 0s (1766kB/s) Selecting previously deselected package libparted1.8-10. (Reading database ... 54675 files and directories currently installed.) Unpacking libparted1.8-10 (from .../libparted1.8-10_1.8.8.git.2008.03.24-11.1_i386.deb) ... Selecting previously deselected package parted. Unpacking parted (from .../parted_1.8.8.git.2008.03.24-11.1_i386.deb) ... Processing triggers for man-db ... Setting up libparted1.8-10 (1.8.8.git.2008.03.24-11.1) ... Setting up parted (1.8.8.git.2008.03.24-11.1) ... |
#dpkg -L parted
/. /usr /usr/share /usr/share/man /usr/share/man/man8 /usr/share/man/man8/parted.8.gz /usr/share/man/man8/partprobe.8.gz /usr/share/doc /usr/share/doc/parted /usr/share/doc/parted/changelog.Debian.gz /usr/share/doc/parted/copyright /usr/share/doc/parted/README.Debian /sbin /sbin/parted /sbin/partprobe |
#dpkg -L parted
/. /usr /usr/share /usr/share/man /usr/share/man/man8 /usr/share/man/man8/parted.8.gz /usr/share/man/man8/partprobe.8.gz /usr/share/doc /usr/share/doc/parted /usr/share/doc/parted/changelog.Debian.gz /usr/share/doc/parted/copyright /usr/share/doc/parted/README.Debian /sbin /sbin/parted /sbin/partprobe |
#partprobe --help
Usage: partprobe [OPTION] [DEVICE]... Inform the operating system about partition table changes. -d, --dry-run do not actually inform the operating system -s, --summary print a summary of contents -h, --help display this help and exit -v, --version output version information and exit When no DEVICE is given, probe all partitions. Report bugs to <bug-parted@gnu.org>. |
#partprobe --help
Usage: partprobe [OPTION] [DEVICE]... Inform the operating system about partition table changes. -d, --dry-run do not actually inform the operating system -s, --summary print a summary of contents -h, --help display this help and exit -v, --version output version information and exit When no DEVICE is given, probe all partitions. Report bugs to <bug-parted@gnu.org>. |
#partprobe -s
/dev/sda: msdos partitions 1 /dev/sdb: msdos partitions 1 2 3 <5 6> |
#partprobe -s
/dev/sda: msdos partitions 1 /dev/sdb: msdos partitions 1 2 3 <5 6> |
#cfdisk /dev/sdb
|
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#mkfs.ext3 /dev/sdb1
mke2fs 1.41.5 (23-Apr-2009) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 612000 inodes, 2443880 blocks 122194 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2503999488 75 block groups 32768 blocks per group, 32768 fragments per group 8160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mkfs.ext3 /dev/sdb1
mke2fs 1.41.5 (23-Apr-2009) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 612000 inodes, 2443880 blocks 122194 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2503999488 75 block groups 32768 blocks per group, 32768 fragments per group 8160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#e2label --help
e2label: No such file or directory while trying to open --help Couldn't find valid filesystem superblock. |
#e2label --help
e2label: No such file or directory while trying to open --help Couldn't find valid filesystem superblock. |
#vol_id /dev/sdb1
ID_FS_USAGE=filesystem ID_FS_TYPE=ext3 ID_FS_VERSION=1.0 ID_FS_UUID=92fa5614-853a-45e5-b807-87301a35ab90 ID_FS_UUID_ENC=92fa5614-853a-45e5-b807-87301a35ab90 ID_FS_LABEL=TEST_VOL ID_FS_LABEL_ENC=TEST_VOL |
#vol_id /dev/sdb1
ID_FS_USAGE=filesystem ID_FS_TYPE=ext3 ID_FS_VERSION=1.0 ID_FS_UUID=92fa5614-853a-45e5-b807-87301a35ab90 ID_FS_UUID_ENC=92fa5614-853a-45e5-b807-87301a35ab90 ID_FS_LABEL=TEST_VOL ID_FS_LABEL_ENC=TEST_VOL |
#blkid /dev/sdb1
/dev/sdb1: LABEL="TEST_VOL" UUID="92fa5614-853a-45e5-b807-87301a35ab90" SEC_TYPE="ext2" TYPE="ext3" |
#blkid /dev/sdb1
/dev/sdb1: LABEL="TEST_VOL" UUID="92fa5614-853a-45e5-b807-87301a35ab90" SEC_TYPE="ext2" TYPE="ext3" |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /mnt type ext3 (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /mnt type ext3 (rw) |
#tune2fs --help
tune2fs 1.41.5 (23-Apr-2009) tune2fs: invalid option -- '-' Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group] [-i interval[d|m|w]] [-j] [-J journal_options] [-l] [-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label] [-M last_mounted_dir] [-O [^]feature[,...]] [-E extended-option[,...]] [-T last_check_time] [-U UUID] [ -I new_inode_size ] device |
#tune2fs --help
tune2fs 1.41.5 (23-Apr-2009) tune2fs: invalid option -- '-' Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group] [-i interval[d|m|w]] [-j] [-J journal_options] [-l] [-m reserved_blocks_percent] [-o [^]mount_options[,...]] [-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label] [-M last_mounted_dir] [-O [^]feature[,...]] [-E extended-option[,...]] [-T last_check_time] [-U UUID] [ -I new_inode_size ] device |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) |
#ls -l /
total 72 drwxr-xr-x 2 root root 4096 2009-05-25 03:02 bin drwxr-xr-x 3 root root 4096 2009-05-25 03:04 boot drwxr-xr-x 15 root root 3700 2009-05-30 12:00 dev drwxr-xr-x 86 root root 4096 2009-05-30 12:14 etc drwxr-xr-x 3 root root 4096 2009-05-25 01:07 home lrwxrwxrwx 1 root root 28 2002-01-01 00:39 initrd.img -> boot/initrd.img-2.6.29-2-686 drwxr-xr-x 13 root root 12288 2009-05-30 11:56 lib drwx------ 2 root root 4096 2009-05-24 21:51 lost+found drwxr-xr-x 2 root root 4096 2009-05-30 11:38 media ... dr-xr-xr-x 114 root root 0 2009-05-30 09:24 proc drwxr-xr-x 6 root root 4096 2009-05-30 10:30 root drwxr-xr-x 2 root root 4096 2009-05-30 11:56 sbin drwxr-xr-x 2 root root 4096 2009-02-21 16:55 selinux drwxr-xr-x 2 root root 4096 2009-05-24 13:15 srv drwxr-xr-x 12 root root 0 2009-05-30 09:24 sys drwxrwxrwt 7 root root 4096 2009-05-30 11:02 tmp drwxr-xr-x 11 root root 4096 2009-05-24 13:22 usr drwxr-xr-x 13 root root 4096 2009-05-24 13:15 var lrwxrwxrwx 1 root root 25 2002-01-01 00:39 vmlinuz -> boot/vmlinuz-2.6.29-2-686 |
#ls -l /
total 72 drwxr-xr-x 2 root root 4096 2009-05-25 03:02 bin drwxr-xr-x 3 root root 4096 2009-05-25 03:04 boot drwxr-xr-x 15 root root 3700 2009-05-30 12:00 dev drwxr-xr-x 86 root root 4096 2009-05-30 12:14 etc drwxr-xr-x 3 root root 4096 2009-05-25 01:07 home lrwxrwxrwx 1 root root 28 2002-01-01 00:39 initrd.img -> boot/initrd.img-2.6.29-2-686 drwxr-xr-x 13 root root 12288 2009-05-30 11:56 lib drwx------ 2 root root 4096 2009-05-24 21:51 lost+found drwxr-xr-x 2 root root 4096 2009-05-30 11:38 media ... dr-xr-xr-x 114 root root 0 2009-05-30 09:24 proc drwxr-xr-x 6 root root 4096 2009-05-30 10:30 root drwxr-xr-x 2 root root 4096 2009-05-30 11:56 sbin drwxr-xr-x 2 root root 4096 2009-02-21 16:55 selinux drwxr-xr-x 2 root root 4096 2009-05-24 13:15 srv drwxr-xr-x 12 root root 0 2009-05-30 09:24 sys drwxrwxrwt 7 root root 4096 2009-05-30 11:02 tmp drwxr-xr-x 11 root root 4096 2009-05-24 13:22 usr drwxr-xr-x 13 root root 4096 2009-05-24 13:15 var lrwxrwxrwx 1 root root 25 2002-01-01 00:39 vmlinuz -> boot/vmlinuz-2.6.29-2-686 |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) |
#df
Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 1029444 0 1029444 0% /lib/init/rw udev 10240 132 10108 2% /dev tmpfs 1029444 4 1029440 1% /dev/shm rootfs 307663800 1709336 290326032 1% / /dev/sdb1 9621848 152684 8980388 2% /root/mnt1 |
#df
Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 1029444 0 1029444 0% /lib/init/rw udev 10240 132 10108 2% /dev tmpfs 1029444 4 1029440 1% /dev/shm rootfs 307663800 1709336 290326032 1% / /dev/sdb1 9621848 152684 8980388 2% /root/mnt1 |
#apt-file search lsof
freebsd-manpages: /usr/share/man/man9/splsoftclock.9freebsd.gz freebsd-manpages: /usr/share/man/man9/splsofttty.9freebsd.gz kde-l10n-ar: /usr/share/locale/ar/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-bnin: /usr/share/locale/bn_IN/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-ca: /usr/share/locale/ca/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-cs: /usr/share/locale/cs/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-da: /usr/share/locale/da/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-de: /usr/share/locale/de/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-el: /usr/share/locale/el/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-engb: /usr/share/locale/en_GB/LC_MESSAGES/ksysguardlsofwidgets.mo ... picon-usenix: /usr/share/picons/usenix/uucp/jlsoft/marquez/face.xbm picon-usenix: /usr/share/picons/usenix/uucp/jlsoft/marquez/face.xpm python-wxgtk2.8: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/tests/nullsoft_installer_script.nsi python-wxgtk2.8: /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/tests/nullsoft_installer_script.nsi recoll: /usr/share/recoll/filters/rclsoff xboing: /usr/share/games/xboing/sounds/wallsoff.au zsh: /usr/share/zsh/functions/Completion/Unix/_lsof zsh: /usr/share/zsh/functions/Completion/Unix/_xmlsoft zsh-beta: /usr/share/zsh-beta/functions/Completion/Unix/_lsof zsh-beta: /usr/share/zsh-beta/functions/Completion/Unix/_xmlsoft |
#apt-file search lsof
freebsd-manpages: /usr/share/man/man9/splsoftclock.9freebsd.gz freebsd-manpages: /usr/share/man/man9/splsofttty.9freebsd.gz kde-l10n-ar: /usr/share/locale/ar/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-bnin: /usr/share/locale/bn_IN/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-ca: /usr/share/locale/ca/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-cs: /usr/share/locale/cs/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-da: /usr/share/locale/da/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-de: /usr/share/locale/de/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-el: /usr/share/locale/el/LC_MESSAGES/ksysguardlsofwidgets.mo kde-l10n-engb: /usr/share/locale/en_GB/LC_MESSAGES/ksysguardlsofwidgets.mo ... picon-usenix: /usr/share/picons/usenix/uucp/jlsoft/marquez/face.xbm picon-usenix: /usr/share/picons/usenix/uucp/jlsoft/marquez/face.xpm python-wxgtk2.8: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/tests/nullsoft_installer_script.nsi python-wxgtk2.8: /usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/tools/Editra/tests/nullsoft_installer_script.nsi recoll: /usr/share/recoll/filters/rclsoff xboing: /usr/share/games/xboing/sounds/wallsoff.au zsh: /usr/share/zsh/functions/Completion/Unix/_lsof zsh: /usr/share/zsh/functions/Completion/Unix/_xmlsoft zsh-beta: /usr/share/zsh-beta/functions/Completion/Unix/_lsof zsh-beta: /usr/share/zsh-beta/functions/Completion/Unix/_xmlsoft |
#apt-get install lsof
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: lsof 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 275kB of archives. After this operation, 451kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main lsof 4.81.dfsg.1-1 [275kB] Fetched 275kB in 0s (1738kB/s) Selecting previously deselected package lsof. (Reading database ... 54688 files and directories currently installed.) Unpacking lsof (from .../lsof_4.81.dfsg.1-1_i386.deb) ... Processing triggers for man-db ... Setting up lsof (4.81.dfsg.1-1) ... |
#apt-get install lsof
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: lsof 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 275kB of archives. After this operation, 451kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main lsof 4.81.dfsg.1-1 [275kB] Fetched 275kB in 0s (1738kB/s) Selecting previously deselected package lsof. (Reading database ... 54688 files and directories currently installed.) Unpacking lsof (from .../lsof_4.81.dfsg.1-1_i386.deb) ... Processing triggers for man-db ... Setting up lsof (4.81.dfsg.1-1) ... |
#!lso
lsof -D /root/mnt1/ lsof: unsupported option: -D lsof 4.81 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. |
#!lso
lsof -D /root/mnt1/ lsof: unsupported option: -D lsof 4.81 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. |
#lsof +D /root/mnt1/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 4130 root cwd DIR 8,17 4096 2 /root/mnt1 lsof 15000 root cwd DIR 8,17 4096 2 /root/mnt1 lsof 15001 root cwd DIR 8,17 4096 2 /root/mnt1 |
#lsof +D /root/mnt1/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 4130 root cwd DIR 8,17 4096 2 /root/mnt1 lsof 15000 root cwd DIR 8,17 4096 2 /root/mnt1 lsof 15001 root cwd DIR 8,17 4096 2 /root/mnt1 |
#fuser
No process specification given Usage: fuser [ -fuv ] [ -a | -s ] [ -4 | -6 ] [ -c | -m | -n SPACE ] [ -k [ -i ] [ -SIGNAL ]] NAME... fuser -l fuser -V Show which processes use the named files, sockets, or filesystems. -a display unused files too -c Same as -m (for POSIX compatibility) -f silently ignored (for POSIX compatibility) -i ask before killing (ignored without -k) -k kill processes accessing the named file ... -n SPACE search in this name space (file, udp, or tcp) -s silent operation -SIGNAL send this signal instead of SIGKILL -u display user IDs -v verbose output -V display version information -4 search IPv4 sockets only -6 search IPv6 sockets only - reset options udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]] |
#fuser
No process specification given Usage: fuser [ -fuv ] [ -a | -s ] [ -4 | -6 ] [ -c | -m | -n SPACE ] [ -k [ -i ] [ -SIGNAL ]] NAME... fuser -l fuser -V Show which processes use the named files, sockets, or filesystems. -a display unused files too -c Same as -m (for POSIX compatibility) -f silently ignored (for POSIX compatibility) -i ask before killing (ignored without -k) -k kill processes accessing the named file ... -n SPACE search in this name space (file, udp, or tcp) -s silent operation -SIGNAL send this signal instead of SIGKILL -u display user IDs -v verbose output -V display version information -4 search IPv4 sockets only -6 search IPv6 sockets only - reset options udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]] |
#ps aux | grep 4130
root 4130 0.0 0.2 7956 4728 pts/9 Rs 09:38 0:01 bash root 15060 0.0 0.0 3952 744 pts/9 S+ 12:20 0:00 grep 4130 |
#ps aux | grep 4130
root 4130 0.0 0.2 7956 4728 pts/9 Rs 09:38 0:01 bash root 15060 0.0 0.0 3952 744 pts/9 S+ 12:20 0:00 grep 4130 |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) |
#umount /root/mnt1
umount: /root/mnt1: device is busy umount: /root/mnt1: device is busy |
#umount /root/mnt1
umount: /root/mnt1: device is busy umount: /root/mnt1: device is busy |
#vi /etc/fstab
--- /tmp/l3-saved-4130.5619.26038 2009-05-30 12:23:15.000000000 +0300 +++ /etc/fstab 2009-05-30 12:24:12.000000000 +0300 @@ -1 +1,2 @@ # UNCONFIGURED FSTAB FOR BASE SYSTEM +LABEL=TEST_VOL /root/mnt1 ext3 defaults 1 0 |
#ls -l /dev/disk/
total 0 drwxr-xr-x 2 root root 400 2009-05-30 12:00 by-id drwxr-xr-x 2 root root 80 2009-05-30 12:10 by-label drwxr-xr-x 2 root root 240 2009-05-30 12:00 by-path drwxr-xr-x 2 root root 100 2009-05-30 12:04 by-uuid |
Время первой команды журнала | 11:10:46 2009- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:29:30 2009- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008