• No se han encontrado resultados

OCUPACIÓN DE ESPACIO PÚBLICO POR EMPRESAS PRESTADORA DE SERVICIOS PÚBLICOS

ARTÍCULO 90. - OBLIGACIÓN DE EXPEDIR CERTIFICADOS DE RETENCIÓN EN LA FUENTE DEL IMPUESTO DE INDUSTRIA Y COMERCIO: Los agentes retenedores

12. OCUPACIÓN DE ESPACIO PÚBLICO POR EMPRESAS PRESTADORA DE SERVICIOS PÚBLICOS

Objective:

To update the students with knowledge about command line file system and partition management.

Scope:

On the completion of this lab, you will be able to recognize:

• Pathnames

• Relative/Absolute Paths,

• Path and Environmental Settings,

• Directories vs. Partitions in the File System,

• Recognizing/modifying Partitions.

• Understand the bash environment.

Useful Concepts:

Directory

A special type of file that contains other files or directories, same as folders in Windows File system

Like other platforms (Windows, Mac OS etc,), Linux file system is also hierarchical one. Directories can be created inside other directories in a tree-like structure.

Root Directory

The Linux file system tree has only one root, called the root directory, represented by / Sub Directory

A directory inside another directory is usually called a subdirectory.

Pathname

Pathname is a sequence of directories to be followed to reach the file. For example, the pathname of the file myfile.txt in the cs user's home directoy is /home/cs/myfile.txt.

Absolute pathnames

A pathname that contains all the information needed to find a file or that start form root directory / is called absolute pathname.

Relative pathname

A pathname that contains information necessary to find a file from a particular point in the tree is called relative pathmane. For example, from the directory /home, the relative pathname of myfile.txt is just cs/myfile.txt. Note that this pathname has no leading /.

Exercise-1:- This exercise illustrates how Multiple Disks in the File system are represented.

Each partition of the disk is mounted at a separate directory in the filesystem. So, for example, a separate disk maybe mounted at the directory /mnt. In this case, every time you access something in directory /mnt, you are actuallyaccessing a file on this separate disk. This is transparent to the user, but you can peek at which disks are mountedwhere on a computer by using the df command in the shell. You will see something like this:

Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda8 497667 78511 393454 17% /

/dev/hda1 14607 2758 1 1095 20% /boot /dev/hda7 5308207 1085340 3948063 22% /usr /dev/hdc 609750 609750 0 100% /mnt/cdrom

The first line indicates that the disk with symbolic name5 /dev/hda8 is mounted at the root directory.

The second line indicates that another disk with symbolic name /dev/hda1 is mounted at subdirectory /boot. The third line is similar.

The disk in the fourth line represents the CD-ROM drive, which is mounted at /mnt/cdrom.

Exercise-2:- This exercise illustrates how to recognize disks.

To see all the disks and partitions on your system, you can list the files in /dev directory. Use ls /dev command will will display all the device related files.

To display only disk related files type:

ls /dev |grep ?d*

output will be something like:

hda1

Here is a brief description of file system names.

Disk file name Description

fd0 First floppy disk drive fd1 Second floppy disk drive

hda First master hard disk drive (IDE-0 master) hdb First slave hard disk drive (IDE-0 slave) hdc Second mater hard disk (IDE-1 master) sda First SCSI disk dirve

sdb Second SCSI disk drive

Exercise-3:- This exercise illustrates Recognizing Partitions.

Enter the command

ls /dev |grep ?d*

To display only disk related files and the output will be something like:

hda1 hda3 hda5 hda7

hdb2

Disk file name Description

hda1 First master hard disk drive (IDE-0 master), first primary partition hda3 First master hard disk drive (IDE-0 master), third partition

hda5 First master hard disk drive (IDE-0 master), 1st logical partition Hda7 First master hard disk drive (IDE-0 master), 3rd logical partition hdb1 First slave hard disk drive (IDE-0 slave), 1st partition

sda1 First SCSI disk drive, first primary partition.

sdb8 Second SCSI disk drive, 4th logical partition

Exercise-4:- This exercise illustrates Mounting/un-mounting partition:

To see the contents stored on a partition you must have a mount point in the root directory from where you can access those contents. To mount a partition, for example hda5 to /mnt directory, type:

mount /dev/hda5 /mnt

Doing this, you will be able to see the content of hda5 partition in /mnt directory.

To mount a Windows NTFS partition, type:

mount -ntfs-3g partition_path Mount_point Un mounting partition, either type:

umount partition

To locate a program file in the user's path, type:

Any of the to command will unmount the mounted partition /dev/hda5 on /mnt Exercise-5:- This exercise describes Miscellaneous commands:

cfdisk Partition table manipulator for Linux export Set an environment variable

fdisk Partition table manipulator for Linux quota Display disk usage and limits quotacheck Scan a file system for disk usage

Exercises for lab:

Exercise 1:- test all the above exercise and write a note on each exercise. Write the results of the com-mands on successful execution of comcom-mands or the error message on any failure and discuss it with your lab instructor.

Exercise 2:-how many disk and partitions are available on your system? Create a directory in your home directory and mount the first logical partition of your primary hard disk to that directory.

Check whether you are able to access the contents of newly mounted file system or not.

Home Work:

1) Define primary partition, extended partition and logical partition. How many primary partitions can you create in a single disk?

2) Search the web and find the procedure of mounting filesystem over the network (remote mount-ing).