Question

In: Computer Science

Linux 1. Give a command line (one command) for displaying the files lab1, lab2, lab3, and...

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.

Solutions

Expert Solution

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.


Related Solutions

Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login...
Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login ID) credential data from the passwd file. Use a pipe and grep command. 2. Give one line of the Linux command to calculate the following and save it in the hex to a file calcOut. Use bc and <<<. 3+2*4 Submit Screenshots HW3: Permission Show the result clearly after each of the following commands are executed. 1. Create a subdirectory, “HW3”. Write the Linux...
Windows XP Command Line questions. a) What is the command to display all of the files...
Windows XP Command Line questions. a) What is the command to display all of the files on the disk in drive A:--do not use the DIR command or the CHKDSK command C:\> b) Display the contents of the PERSONAL.FIL file located in the root directory of drive A: one screenful at a time C) Display the contents of the PERSONAL.FIL file located in the root directory of drive A:, one screenful at a time, beginning with the 25th record, on...
LINUX In Linux command line write a shell script ex1.sh that uses IF THEN to Prompt...
LINUX In Linux command line write a shell script ex1.sh that uses IF THEN to Prompt the user to "Enter a number between 1 and 10". (Hint: Use the 'echo' and 'read' commands in the script. See the slide about the 'read' command) If the number is less than 5, print "The number is less than 5" (Hint: You will read input into a variable; e.g. read NUM. In the IF statement, enclose $NUM in quotes; e.g. "$NUM". Also, remember...
Introduction Write in C++ at the Linux command line a program that is the same as...
Introduction Write in C++ at the Linux command line a program that is the same as the previous collection app project but now uses a class to store the items and also can save the items to a file that can be read back into the array by the user when the program is re-started. You can use your project 1 submission as a starting point or you can do something new as long as it meets the listed requirements....
Linux What is the tar command? a. Can you compress files using tar? Please explain how...
Linux What is the tar command? a. Can you compress files using tar? Please explain how and provide a brief example. b. How do you create a tar file? Please provide an example. c. How do you extract files in a tar format? Please provide an example.
Using Linux in VirtualBox To display your system date: Type date in the command line, and...
Using Linux in VirtualBox To display your system date: Type date in the command line, and press Enter. What do you see?                                            You might see the abbreviation EDT (Eastern Daylight Time) instead of EST (Eastern Standard Time), or another time zone abbreviation, such as MDT (Mountain Daylight Time) or CST (Central Standard Time). Notice also that UNIX/Linux uses a 24-hour clock. Type Date in the command line, and press Enter. What error do you see?                                    The system error...
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command...
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command that would find all lines that have an email address and place a label email = before the line in the file longfile output will multiple lines similar to this one : using a good awk command the output would be something like this email = From: "Linder, Jann/WDC" <[email protected]> email = To: Mr Arlington Hewes <[email protected]> email = > From: Mr Arlington Hewes...
Demonstrate creating, moving, and copying files from the Windows command line. (Document with steps and screenshots.)
Demonstrate creating, moving, and copying files from the Windows command line. (Document with steps and screenshots.)
Linux question: Take the command 'vmstat' in linux for a program, explain why the number of...
Linux question: Take the command 'vmstat' in linux for a program, explain why the number of context switches is more than the number of interrupts?
unix/Linux Create a tar command using the man command and the link referred to in To...
unix/Linux Create a tar command using the man command and the link referred to in To Practice and Explore: Text File Utilities #9. Preliminaries Use the man pages to learn more about tar Review the links referred to in To Practice and Explore: Text File Utilities #9 to see examples of using tar command Perform Use tar "to stuff" three files and then "unstuff" them into a new directory. Include the -v option. Task ll to show the original 3...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT