((lambda (x) (x x)) (lambda (x) (x x)))

Thursday, September 4, 2008

SYA710 Lab #00

SYA710 Lab #00:



#1. What is your full name?



My full name is Gregory John Masseau. Suppose you're no longer requesting student numbers in this question this semester?



#2. What is the output in steps 3 and 8?



'fdisk -l' on Ubuntu 8.04:

Disk /dev/sda: 10.2 GB, 10200547328 bytes

255 heads, 63 sectors/track, 1240 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x0008edf2



Device Boot Start End Blocks Id System

/dev/sda1 * 1 1181 9486351 83 Linux

/dev/sda2 1182 1240 473917+ 82 Linux swap / Solaris



Disk /dev/sdb: 62.0 GB, 62014404096 bytes

255 heads, 63 sectors/track, 7539 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x6ab1bd22



Device Boot Start End Blocks Id System

/dev/sdb1 1 609 4891761 83 Linux

/dev/sdb2 610 1826 9775552+ 83 Linux

/dev/sdb3 1827 3651 14659312+ 83 Linux

/dev/sdb4 3652 7539 31230360 83 Linux



'fdisk -l' on Fedora 8:

Disk /dev/sda: 10.2 GB, 10200547328 bytes

255 heads, 63 sectors/track, 1240 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00058f46



Device Boot Start End Blocks Id System

/dev/sda1 * 1 51 409626 83 Linux

/dev/sda2 52 688 5116702+ 83 Linux

/dev/sda3 689 752 514080 82 Linux swap / Solaris



Disk /dev/sdb: 62.0 GB, 62014404096 bytes

255 heads, 63 sectors/track, 7539 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x6ab1bd22



Device Boot Start End Blocks Id System

/dev/sdb1 1 609 4891761 83 Linux

/dev/sdb2 610 1826 9775552+ 83 Linux

/dev/sdb3 1827 3651 14659312+ 83 Linux

/dev/sdb4 3652 7539 31230360 83 Linux



Disk /dev/dm-0: 16.1 GB, 16106127360 bytes

255 heads, 63 sectors/track, 1958 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000



#3. What is the purpose of the sudo command?



The sudo command allows you to execute a command as another user. If no user is specified (which can be

done with the '-u username' switch), sudo will attempt to execute the command as the root user.



Depending on the configuration (generally configured using the '/etc/sudoers' file) a password (or other form of authentication) may be required, and the ability to masquerade as particular users or execute particular commands as a substitute user may be limited based on the user or group IDs of the user executing the sudo command.



#4. What is the purpose of the minus sign (-) when using the su command?



The dash signifies that su should simulate a full login by discarding the current environment and loading the substituted user's shell environment configuration in it's place.



#5. Explain how you deleted the partition table with fdisk.



I deleted the partition table using fdisk by way of cfdisk, a Curses library based interface to the fdisk utility. Within the cfdisk program, I highlighted each partition in turn using the vertical arrows keys, selected the 'Delete' option with the horizontal arrow keys, and hit enter. After all partitions were removed, and the partition list displays only a single entry whose FS Type field reads 'Free Space', I selected the 'Write' option, and hit enter to execute it. After exiting cfdisk, the 'partprobe' command was invoked to inform the kernel of the changes to the partition table.



#6. What is the purpose of the partprobe command?



The 'partprobe' command causes the kernel to re-read the partition table to reflect changes since the partition table was last read by the kernel, this time generally being the last time the machine in question was booted. This has surprisingly little effect on system behavior as the Linux kernel does not make much use of the partition table for normal operations once it has completed booting.



#7. Write the complete mail command you would use to email a copy of lab00 to your LEARN account from MATRIX.



I would invoke the mail command using the following form:



'mail -s "ops335-lab00" john.selmys@senecac.on.ca < lab00.txt



#8. What is the function of the -s option to the mail command?



The '-s' switch of the mail causes the mail command to make use of the argument following the '-s' switch as the subject line of the email being sent.

No comments: