- On what device is the file /nt/earl/test1.html ________________
- Files in /tmp are on what device? _____________________
- /cdrom is what kind of file? ___________________________
- Why does the /proc directory have a size of 0?
_____________________________________________________
- What is the filesystem type of /dev/scd0? _______________________
- If we do the command:
umount /dev/sda1
what will happen if we do ls -l /nt?
______________________________________________________
- If the command
ls /cdrom/FIRST shows:
/cdrom/FIRST
and then we do these commands, write the results of the two ls
commands:
umount /dev/scd0
ls /cdrom/FIRST # ____________________________________
mount /dev/scd0 /mnt
ls /mnt/FIRST # ____________________________________
- In EXT2/EXT3, mark these data items as being in
the (I)node, (D)irectory, or (G)roup Descriptor, or (S)uperblock.
___ Filename
___ Pointers to physical disk blocks containing file data
___ Number of free blocks in the file system
___ Permissions
___ INODE table
___ File owner
___ Block size
___ Time file last modified
___ Time file created
___ Time file last accessed
- In EXT2/3, how large is each directory entry?
- 32 bytes
- 128 bytes
- 1024 bytes
- One block depending upon block size
- It depends on the length of the filename.
- How many Superblocks are there in an EXT2/3 filesystem?
- 1
- 2
- One for each block group
- One for each file
- One for each directory
- Explain the purpose of double and triple indirection for
data block pointers in the inode?
_______________________________________________
________________________________________________
________________________________________________
- There is a Linux file, /proc/meminfo, which describes
information about the computer memory. Where does this data actually
come from when you display the file (e.g. cat /proc/meminfo)?
- Files on the disk which are built at boot time.
- Files on the disk built when the operating system was installed.
- Information in various kernel data structures.
- The inode table.
- The Superblock
- The following file listing shows a symbolic link.
lrwxrwxrwx 1 earl users 26 2006-08-24 08:54
Examples -> /usr/share/example-content
How does file management know this file is a symbolic link?
- By examining the actual data in the file.
- The directory itself says this is a link.
- The inode indicates that this entry is a symbolic link.
- The Superblock points to all symbolic links.
The length is 26 bytes? What is this the length of?
_________________________________________________________________
If we rm /usr/share/examples-content, what happens if
we later do: cat Examples?
__________________________________________________
What will an ls -l Examples show?
__________________________________________
- Assume my USB port is /dev/sdb1 and I mount this:
mount /dev/sdb1 /stick
and then I copy many (containing 10Meg of data) files to the USB stick:
cp /tmp/*.html /stick #Wait for command to finish and prompt appears
What happens if I immediately remove the USB stick?
- Since the command finished, the data has been written to the stick.
- The files may and may not be written or partially written to the stick.
- No files will have been written since they are not written until the
stick is unmounted.
- A warming message will appear saying to reinsert the stick.
-
What will happen when I do the following
command right after the above cp command?
umount /dev/sdb1
- If a
sync command is not done first, the data will be
lost.
- There may be a delay in the
umount command while data
is written from cache to the stick.
- The
umount command will fail since data may still be
in cache. The user must continue to do an ls comand to see when the
data is written.
- The data on the stick will be read to verify that it matches what is
in cache.
- What is different if after mounting the USB stick, I do these
commands?
cp /tmp/*.html /stick
sync
______________________________________________________
- In Windows, when I insert a USB stick it is recognized. If I then
copy many files (10 Meg of data) to the stick, what happens?
copy /tmp/*.htm E:
- The copy command completes immediately and a popup window will inform me
when the data is actually written.
- The data will only be written when the stick is removed.
- The data will be written when the user "ejects" the stick.
- The copy command will not complete until the data is written.
- The user must do a dir constantly to see when the data is written.