For the following exercises, log into any one of the student accounts. Use the man pages (online help) if you need comma

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

For the following exercises, log into any one of the student accounts. Use the man pages (online help) if you need comma

Post by answerhappygod »

For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 1
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 1 (35.67 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 2
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 2 (24.63 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 3
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 3 (37.39 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 4
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 4 (26.27 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 5
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 5 (35 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 6
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 6 (28.88 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 7
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 7 (26.38 KiB) Viewed 103 times
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 8
For The Following Exercises Log Into Any One Of The Student Accounts Use The Man Pages Online Help If You Need Comma 8 (29.79 KiB) Viewed 103 times
For the following exercises, log into any one of the student accounts. Use the man pages (online help) if you need command details, syntax and information, or refer to related handouts, or google. *** On the lab answers - be sure you use the form fields, so that your answers are show in red *** SECTION 1 - Standard Output and Error: Enter the following command: badcommand > outfile. "badcommand" is not a valid unix command, so why was there no error output to the screen? Where is this output and what is the error? Delete the outfile file. What command did you use: Enter the following command: badcommand > outfile >&1; Is > outfile >>&1. View the outfile file. Why isn't the error output from the "badcommand" command in the outfile? How would you change the previous command to get BOTH the badcommand error output AND the is output to the outfile file? Enter the command here after you have verified that it works: The default standard output location device in unix is the: > 40

Provide 2 DISTINCT examples of stdout redirection syntax and provide the full command: and The default standard error location/device in unix is the Provide 2 DISTINCT examples of stderr redirection syntax and provide the full command: and

A directory structure is to be created below your home directory. This structure contains 3 levels below in the form of 3 subdirectories, such as dir1/dir2/dir3. This can be accomplished by typing the following commands (do not enter these mkdir dirl: od dirl: mkdir dir2: od dir2: mkdir di3. Create this directory structure using one mkdir command (without using semicolons). (Use man to determine what option to use). What command did you use? Now remove the entire dirl structure and all directories below with one command. What command did you use: Create the same directory structure again using one mkdir command (do not use semicolons), and this time add an option to the command which will show you what directories it created. What command did you use: At this point you should have a directory structure with subdirectories dir1/dir2/dir3 below your home directory. With one command, create a file called file with the touch command in the dir1/dir2/dir3 directory. What command did you enter? Use the find command to find all files below your home directory, which have a file type (-type) of "directory". What command did you use: Now use the find command to find files below your home directory which have a block size greater than 1 block (where 1 block = 512 bytes). What command did you use? Were any files found? dimai Then repeat the above find

Now type the following command from your home directory: Is / >> dirt/dir/file2. Then repeat the above find command to search for files which have a block size (512 bytes) greater than 1 block. Execute the above is redirection command repeatedly and then the above find command repeatedly, until the find command "finds" diri/dir/file2 to be greater than 1 block (512 bytes) What is the file size of the file file when the find command finds it? Research on google why the directory file size is not zero but typically 4096 bytes: From your home directory, find all files with the find command, which start with the letters "file". What command did you use? 2 What or how many files were found (If too many to list, enter"many'')? Che file helow your home

Now use the find command from your home directory again to find the file type of all of the files below your home directory. (HINT: use the -exec option with file command). What command did you use: In your home directory, create a new subdirectory called findtest. Now ed to the findtest subdirectory and then create a file in it called testi. Therefore, the only file in the findtest subdirectory should be testi, Run the following 2 find commands (note the second one is without double-quotes): 1.) find. -name **test ** -Is 2.) find -nametests Do both of the commands work? Now create another file in the findtest directory called test and run the 2 find commands above again. Which command (#1 or #2) generates an error? Explain in detail why one of them generates an error, and the other does not. (HINT: Remember to use the set -x command to see how the shell interprets this command, in this case, the asterisk (*): SECTION 3 - Managing/Manipulating Files and Directories: Ensure you are in your home directory. Create 5 files called file through file10. Copy file into a new file called file66. What command did you use? d did nu?

Copy me to a file called diridir3/de77 What command did you use? Copy all files in your home directory level (not those in subdirectories), beginning with "file" into the dirt subdirectory using the asterisk (*) wildcard character. What command did you use? Create a new directory in your home directory called dext. Now copy all of the files/directories under the dirt subdirectory into the dest directory with one ep command. Ensure that the dirt directory itself does not get copied into dest, only files/directories below dirt. (Do some research here...). What command did you use? What 2 command(s) can you use to verify that the copy was successful? and 3 Move (not copy), the file10 file into the dirl subdirectory. What command did you use? What is the difference between a move and copy command? What happens, if anything, to the date/time on a "moved" file?

What happens, if anything, to the date/time on the destination filename after a "copy" operation? SECTION 4 - Combining Files: Create 2 files with the echo command, one called tsports (for team sports) and one called isports (for individual sports). Populate them as follows: Esports isports Hockey Pool Baseball Tennis Basketball Golf Football Bowling Soccer Skating Use the cat command with output redirection to combine these two files (specifying tsports first), into a file called cat_allsports. What command did you use: How does cat organize the data from two files into one file? Now use the paste command to combine the tsports (specified first), and isports files and have the output go to the screen, What command did you use:

Use the cut command to extract the first column or field of the paste_allsports_colon file (in this case, the team sports data) and have the output go to the screen. (Remember the file is delimited with colons). Verify the command works. What command did you use: Now use the cut command to extract the first 6 characters (of each row) of the paste_allsports colon file. Verily the command works. What command did you use: Type the following command: sort paste_allsports_colon. How does the sort command sort the file by default, when entered with no options? Notice that the contents of the input file is unchanged after you "sort" it. Now sort the paste_allsports colon file by sorting on the 2 colon-separated field, and sending the output to a file called sorted2. The output should be sorted based on the second column or field (isports data). What command did you use:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply