preguntasrevision
preguntasrevision
Universidad de Cuenca
Facultad de Ingeniería
Escuela de Ingeniería Electrónica y Telecomunicaciones
Sistemas Operativos
Ing. Fabián Astudillo, PhD.<[email protected]>
1. Which of the following Linux file system commands can you issue
(a) On a directory?
(b) On a file?
10. List the files that the following command will display: ls ab?.txt
11. List the files that the following command will display: ls bbb*
12. List the files that the following command will display: ls bbb.*
13. List the files that the following command will display: ls c??.txt
14. List the files that the following command will display: ls [ab][ab][ab].*
15. List the files that the following command will display: ls [a-c]??.???
16. List the files that the following command will display: ls [!c]*
17. Refer back to Figure 3.4. Assume that you are currently in the subdirectory temp2 of foxr. Assume
the subdirectory a contains five files and subdirectory b is empty.
Sistemas Operativos (11031/19385) Preguntas de revisión 1
Página 2
Sistemas Operativos (11031/19385) Preguntas de revisión 1
36. Repeat question 35 assuming that alink is a hard link instead of a symbolic link.
37. Write a find command to find and list all files in the current directory accessed within the last 3 days.
38. Write a find command to find all files in your home directory modified less than 60 min ago and delete
them.
39. Write a find command to perform wc -l on all files in your home directory newer thanthe file myfile.txt.
40. Write a find command to find all files in the entire file system (starting at /) whose permissions are
666 and change them to 664.
41. Write a find command to find all files in the current directory whose size is between 1000 and 10,000
bytes.
Assume for questions 42 through 50, we have the following partial long listing of files and subdirectories
in the current directory. Also assume that you are not user foxr but you are in the group cool. Answer
each question independently (i.e., do not assume that a previous instruction changed the permissions
as shown below). drwxrwxr– foxr foxr ... subdir1 drwxr-xr– foxr cool ... subdir2 -rw-rw-r– foxr foxr ...
foo1 -r-xr-xr– foxr foxr ... foo2 -rwxr—– foxr cool ... foo3 -rw-r–r– foxr foxr ... foo4 -rw-rw-rw- foxr foxr
... foo5
42. Provide the 3-digit permissions for each of the items listed here.
43. Write a chmod command to permit execute access both group and world for foo3 using the ugo=
approach. Write a chmod command to permit execute access both group and world for foo3 using the
ugo+/- approach.
44. Write a chmod command to permit execute access both group and world for foo3 using the 3-digit
approach.
45. Write a chmod command to permit write access to foo4 for group but remove read access for world
using the ugo+/- approach.
46. Write a chmod command to remove all group and world access to foo1 using the ugo+/- approach.
47. Write a chmod command to remove all group and world access to foo1 using the 3-digit approach.
48. As a member of cool, do you have the ability to cd into subdir2?
49. Of the items listed here, which have permissions that you think should be altered? Why?
50. Which of the following permissions you generally do not see in a Linux system? Why not?
(a) 765
(b) 646
(c) 404
(d) 200
(e) 111
51. What does the permission 1777 mean? How would the permissions of such a directory appear when
you use ls –al?
52. Why might you make a directory world-writable? If you do so, what are the consequences on files
stored there?
53. Why would you set a directory’s sticky bit?
54. How does the /proc directory differ from all other top-level directories?
Página 3
Sistemas Operativos (11031/19385) Preguntas de revisión 1
55. Briefly explain the difference between the types of programs you would find in /bin versus /sbin.
56. Why is /root located under / and not /home?
57. Of the following directories, which would you generally not anticipate changing for weeks or more at a
time? /bin, /boot, /home, /sbin, /var
58. Under which top-level directory will the system administrator probably spend time editing files?
59. Explain why a user may wish to invest in a magnetic tape drive and magnetic tape cartridges.
60. Research the following compression formats and specify whether they are lossy or lossless: flac, gif,
jpeg, mp3, mpeg-1, mpeg-2, mpeg-4, png, tiff, and wma.
61. A file stores the following text. Define a dictionary of words for this file and then substitute each word
with a number as its replacement where the number is the location of the word, alphabetically, in the
dictionary. Periods, spaces, and line breaks should be retained in the file. Include your dictionary in
your replacement file. How much compression do you achieve with your replacement file?
The blue fox jumped over the red cow. The red cow ate the green grass. The green cow ate the blue
grass. The blue fox then jumped over the green cow. The green cow ate more blue grass.
Página 4