Linux
9. Use the command: tr r R < /etc/issue > newissue. What happens?
10. Use the command: sort < newissue > newissue. What happens?
11. Use the command: ls -l /etc | less. What is the purpose of the vertical bar? What does it do in this command?
12. Use the command: mount | grep ext4. What happens?
9. It will replace all the 'r' with 'R' in text stored in /etc/issue and it will store the changed text in newissue or whatever file will be mentioned.
10. It is used to sort the data in a file. sort <file1 > file2 , it will sort all the words lexicographically and store it in file2.
11. " ls -l /etc " will print all the directories and folders in the /etc folder where -l means list representation is needed. So if "| less " is added to the command, it means we do not want it to print on the screen, list will be shown in new page which can also be scrolled and q can be pressed to return back to the terminal.
12. " mount " command lists all the directories which are mounted in the system, by adding " | grep ext4 " system will show if ext4 has been mounted or not.
Linux 9. Use the command: tr r R < /etc/issue > newissue. What happens? 10. Use...
Some multiple choice questions of Computer Science: Linux command; Actually I can google it but the choice here is a little..unclear. So I can't make sure..Thank you! 1:What does the Linux command “cat” do? a. copy the contents of a file to the screen b. count the number of characters in a file c. create a Linux catalog d. open up an edit session allowing you to modify a file 2:Which of the following Linux commands is best for getting...
Linux 13. Use the command: set | less. What does the set command do? 14. What is the purpose of the variables: PS1, HOME, PWD, PATH? 15. Use the command: echo $PS1. Why did you have to use the dollar sign with the variable name? What did it do? 16. Use the command: PS1="This is my new prompt: #". What did it do?
2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...
2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what is its purpose? 3. At the command prompt, type less /etc/rsyslog.conf and press Enter to view the configuration file for the System Log Daemon. Are there any entries that specify facilities, priorities, or log file locations? What does the last line of the file specify? Press q when finished to quit the...
QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A. List all files and directories recursively starting from / B. List a file names * in / C. List all files in / directory D. List all files and directories in / directory QUESTION 2 Which command is used to extract a column/field from a text file / input. A. paste B. get C. cut D. tar QUESTION 3 Which command creates an empty...
Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...
WITH SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run processes in the background, kill them using the kill and killall commands, and change their priorities using the nice and renice commands. 1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type sleep 6000 and...
Please write the Linux commands and run them. h. What is the command or commands that would list the contents of the /var/log directory in alphanumeric order? List the command and its output. i. What is the command or commands used to list the files in /var/log in order of their size? List the command and its output. j. What is the command or commands used to list the top 10 file who use the most disk space? What is...
Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...
QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...