010-160: LPI Linux Essentials Practice Questions and Answers
010-160: LPI Linux Essentials Practice Questions and Answers whereis - Correct Answer️️ -used to search for programs in restricted locations, such as binary file directories, libraries, and man directories. locate - Correct Answer️️ -Searches the system managed database of filenames for files containing the specified string in the filenames. (Search is much faster than the search performed using the 'find' command) updatedb - Correct Answer️️ -Updates the system managed database of filenames Displays current working directory - Correct Answer️️ -pwd Change into the current user's home directory - Correct Answer️️ -cd ~ cd $HOME Both of these do what Change to the parent directory of the current directory - Correct Answer️️ -cd .. Change to the etc directory in the root (/) directory - Correct Answer️️ -cd /etc Creates a hard link named '' for the file '' - Correct Answer️️ -ln Creates a symbolic link named of - Correct Answer️️ -ln -s touch - Correct Answer️️ -Can be used to update the timestamp of a file or if that file doesn't exist it will create a blank file with the specified name. Will update the timestamp of the specified file if it exists. If it does not exist it will not create a blank file. - Correct Answer️️ -touch -c Adds the content "Hey there!" to the specified file. - Correct Answer️️ -echo "Hey there!" > cat - Correct Answer️️ -Displays the contents of a file Opens the vi editor for the file "sample". This will allow you to write text into a file. - Correct Answer️️ -vi sample Will display the "sample" file's byte count - Correct Answer️️ -wc -c sample Displays the number of characters in the "sample" file - Correct Answer️️ -wc -m sample Display the number of lines in the "sample" file - Correct Answer️️ -wc -l sample Display the word count of the "sample" file - Correct Answer️️ -wc -w sample Extracts the first field of the "/etc/passwd" file - Correct Answer️️ -cut -f 1 /etc/passwd Extract the first three characters from the "/etc/passwd" file - Correct Answer️️ -cut -c 1, 2, 3 /etc/passwd Extracts the third field from the "/etc/shadow" file and uses the : seperator. Since "/etc/shadow" is a : (colon) seperated file, this command will display only the content of the third field in the file. - Correct Answer️️ -cut -d ":" -f 3 /etc/shadow Search for all the rows containing the string "/home" in the "/etc/pa
Written for
- Institution
- Linux
- Course
- Linux
Document information
- Uploaded on
- May 28, 2024
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
010 160 lpi linux essentials practice questions a
Also available in package deal