010-160: LPI Linux Essentials Questions With Complete Solutions
010-160: LPI Linux Essentials Questions With Complete Solutions whereis - ANS used to search for programs in restricted locations, such as binary file directories, libraries, and man directories. locate - ANS 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) updated - ANS Updates the system managed database of filenames Displays current working directory - ANS pwd Change into the current user's home directory - ANS cd ~ cd $HOME Both of these do what Change to the parent directory of the current directory - ANS cd .. Change to the etc directory in the root (/) directory - ANS cd /etc Creates a hard link named '' for the file '' - ANS ln Creates a symbolic link named of - ANS ln -s touch - ANS 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. - ANS touch -c Adds the content "Hey there!" to the specified file. - ANS echo "Hey there!" cat - ANS Displays the contents of a file Opens the vi editor for the file "sample". This will allow you to write text into a file. - ANS vi sample Will display the "sample" file's byte count - ANS wc -c sample Displays the number of characters in the "sample" file - ANS wc -m sample Display the number of lines in the "sample" file - ANS wc -l sample Display the word count of the "sample" file - ANS wc -w sample Extracts the first field of the "/etc/passwd" file - ANS cut -f 1 /etc/passwd
Document information
- Uploaded on
- July 5, 2023
- Number of pages
- 7
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers