Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

010-160: LPI Linux Essentials Questions and Answers Latest Update 100% Correct.

Document preview thumbnail
Preview 2 out of 6 pages

List the files in the var/cache directory owned by the root user (limit the search to two levels) - ️️find /var/cache -maxdepth 2 -user root find /var/cache -maxdepth 2 -uid 0 locate - ️️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 - ️️Updates the system managed database of filenames Displays current working directory - ️️pwd Change into the current user's home directory - ️️cd ~ cd $HOME Both of these do what Change to the parent directory of the current directory - ️️cd .. Change to the etc directory in the root (/) directory - ️️cd /etc Creates a hard link named '' for the file '' - ️️ln Creates a symbolic link named of - ️️ln -s Will update the timestamp of the specified file if it exists. If it does not exist it will not create a blank file. - ️️touch -c Adds the content "Hey there!" to the specified file. - ️️echo "Hey there!" cat - ️️Displays the contents of a file Opens the vi editor for the file "sample". This will allow you to write text into a file. - ️️vi sample Will display the "sample" file's byte count - ️️wc -c sampleDisplays the number of characters in the "sample" file - ️️wc -m sample Display the number of lines in the "sample" file - ️️wc -l sample whereis - ️️used to search for programs in restricted locations, such as binary file directories, libraries, and man directories. Display the word count of the "sample" file - ️️wc -w sample Extracts the first field of the "/etc/passwd" file - ️️cut -f 1 /etc/passwd Extract the first three characters from the "/etc/passwd" file - ️️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. - ️️cut -d ":" -f 3 /etc/shadow Search for all the rows containing the string "/home" in the "/etc/passwd" file - ️️grep /home /etc/passwd Display the number of lines containing the string "/bin" in the "/etc/passwd" file - ️️grep -c /bin /etc/passwd Display the details of the root user from the /etc/shadow file - ️️grep root /etc/shadow Search the /etc directory recursively for the string "wlan" - ️️grep -r wlan /etc Find all the files in the /etc directory having names that start with pass - ️️find /etc - name pass* List the files in the /etc directory with extensions conf (limit the search to one level) - ️️find /etc -maxdepth 1 -name *.conf List all the files on system with the permission set 640 (limit the search to two levels) - ️️find / -maxdepth 2 -perm 640 List all the files in the /root directory that belong to the root group (do not use shorthand for specifying the directory) - ️️find /root -group root find /root -gid 0Sort the contents of the /etc/passwd file, and display it on the stdout - ️️sort /etc/passwd Numeric sort the third field of the /etc/passwd file and display it on the stdout - ️️cut -f 3 -d ":" /etc/passwd | sort -n Redirects the output of the echo $HOME command to a file named sample, overwriting its contents - ️️echo $HOME sample Appends the output of the pwd command to the sample file - ️️pwd sample Redirects the sample file as an input to the cat command. This will display the contents of the sample file. - ️️cat sample Appends only the standard error of the pwd;ech command to the sample file. - ️️pwd;ech 2 sample Overwrites the contents of the sample file with the standard output and error of the ls ~ /test command. - ️️ls ~ /test & sample Installs the traceroute program on Debian-based systems. - ️️apt-get install traceroute Whats it do and What distro typically uses it. Upgrades the system's software - ️️apt-get update apt-get upgrade Removes the traceroute package - ️️apt-get remove traceroute View all processes currently running - ️️ps Lists all the process that are currently running and are owned by the root user - ️️ps -u root Displays a dynamically updated list of processes running on the system - ️️top Displays the system's overall memory usage - ️️free

Content preview

010-160: LPI Linux Essentials
List the files in the var/cache directory owned by the root user (limit the search to two
levels) - ✔️✔️find /var/cache -maxdepth 2 -user root
find /var/cache -maxdepth 2 -uid 0


locate - ✔️✔️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 - ✔️✔️Updates the system managed database of filenames

Displays current working directory - ✔️✔️pwd

Change into the current user's home directory - ✔️✔️cd ~

cd $HOME

Both of these do what

Change to the parent directory of the current directory - ✔️✔️cd ..

Change to the etc directory in the root (/) directory - ✔️✔️cd /etc

Creates a hard link named 'format.txt' for the file 'fmt.txt' - ✔️✔️ln fmt.txt format.txt

Creates a symbolic link named sym.txt of fmt.txt - ✔️✔️ln -s fmt.txt sym.tx


Will update the timestamp of the specified file if it exists. If it does not exist it will not
create a blank file. - ✔️✔️touch -c file1.txt

Adds the content "Hey there!" to the specified file. - ✔️✔️echo "Hey there!" >
sample.txt

cat filename.txt - ✔️✔️Displays the contents of a file

Opens the vi editor for the file "sample". This will allow you to write text into a file. -
✔️✔️vi sample

Will display the "sample" file's byte count - ✔️✔️wc -c sample

, Displays the number of characters in the "sample" file - ✔️✔️wc -m sample

Display the number of lines in the "sample" file - ✔️✔️wc -l sample


whereis - ✔️✔️used to search for programs in restricted locations, such as binary file
directories, libraries, and man directories.

Display the word count of the "sample" file - ✔️✔️wc -w sample

Extracts the first field of the "/etc/passwd" file - ✔️✔️cut -f 1 /etc/passwd

Extract the first three characters from the "/etc/passwd" file - ✔️✔️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. - ✔️✔️cut -d ":" -f 3 /etc/shadow

Search for all the rows containing the string "/home" in the "/etc/passwd" file -
✔️✔️grep /home /etc/passwd

Display the number of lines containing the string "/bin" in the "/etc/passwd" file -
✔️✔️grep -c /bin /etc/passwd

Display the details of the root user from the /etc/shadow file - ✔️✔️grep root
/etc/shadow

Search the /etc directory recursively for the string "wlan" - ✔️✔️grep -r wlan /etc

Find all the files in the /etc directory having names that start with pass - ✔️✔️find /etc -
name pass*

List the files in the /etc directory with extensions conf (limit the search to one level) -
✔️✔️find /etc -maxdepth 1 -name *.conf

List all the files on system with the permission set 640 (limit the search to two levels) -
✔️✔️find / -maxdepth 2 -perm 640

List all the files in the /root directory that belong to the root group (do not use shorthand
for specifying the directory) - ✔️✔️find /root -group root
find /root -gid 0

Document information

Uploaded on
September 22, 2024
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ACADEMICMATERIALS
4.0
(100)
Sold
622
Followers
185
Items
10510
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions