In: Computer Science
Linux
1. Give a command line (one command) for displaying the files lab1, lab2, lab3, and lab4. Can you give another command lines that do the same thing by making use of the file name similarities? What is the command line for displaying the files lab1.c, lab2.c, lab3.c, and lab4.c? (Hint: use shell metacharacters.)
2. How to determine the number of users who are logged on to Linux server system at this time? What command did you use to discover this?
3. Determine the name of the operating system that the Linux server runs. What command did you use to discover this
4. What are special files in UNIX? What are character special files and block special files? Run the ls /dev | wc -w command to find the number of special files that the linux server system has.
5. What is the inode number of the root directory on the linux server? Give the commands that you used to find the inode number.
1. cat lab1 lab2 lab3 lab4
Yes we can use wildcard to utilize their name similarity.
cat lab*
2. users | wc -w
Here users return names of users logged in currently to system. and wc -w counts those no of words.
3. cat /proc/version
To discover it we used cat.
4.In UNIX special files are used to represnt Physical devices like hard disk, printer etc. They are mostly used for input/output by the operating system.If we use a character special file for device Input/Output(I/O), data is transferred one character at a time. This type of access is called raw device access. Wheras if we use a block special file for a device or Input/Output(I/O), data is transferred in large fixed-size blocks. This type of access is called block device access.
228
5. 2
We used ls -d / to find the inode no of root directory.