To hide icons for standard folders like "Documents," "Downloads," etc., on the Ubuntu desktop, follow these steps:
- Install GNOME Tweaks (if not already installed):
sudo apt install gnome-tweaks
- Open GNOME Tweaks.
- Go to Desktop or Extensions > Desktop Icons.
- Toggle off Show Personal Folder or individual options for specific folders like Documents, Downloads, etc.
If GNOME Tweaks doesn’t work, you can use dconf Editor:
- Install
dconf Editorif it's not installed:sudo apt install dconf-editor
- Open dconf Editor and navigate to:
org > gnome > shell > extensions > desktop-icons - Find options like show-home, show-documents, show-downloads, etc., and turn them off.
Here's a detailed breakdown and commands for using locate, including options for database updates and filtering results.
The locate command uses a pre-built database to quickly find files. This database is updated only once daily by default, which means recent file changes (creations or deletions) might not appear in the search results until the next update.
To refine your search results with specific criteria:
- Use
-eor--existingto check if files still exist before displaying results. - Use
-Lor--followto check if symbolic links point to valid files. Broken symbolic links will be excluded from the results.
-
To check existing files and exclude broken links:
locate --existing --follow *.txt -
Combining options: You can combine options to ignore case, check existing files, follow valid symbolic links, and limit results:
locate --existing --follow -i --limit 5 *.conf | wc -l
Here,
wc -lcounts the output lines for comparison.Observe the Differences:
locate *.conf | wc -l locate -i *.conf | wc -l locate --existing -i *.conf | wc -l locate --existing --follow -i *.conf | wc -l locate --existing --follow -i --limit 10 *.conf | wc -l
The locate database can be updated manually with the updatedb command. This is useful if you've recently added or deleted files and want locate to reflect the changes immediately.
-
Update the Database:
sudo updatedb
-
Check Database Details: Use
locate -Sto see database statistics (if supported on your system):locate -S
Example Output:
Database /var/lib/mlocate/mlocate.db: 39,527 directories 369,078 files 242,425,20 bytes in file names 9,340,974 bytes used to store database
Q1) Which of the following are Valid Options for the locate Command?
Options:
- A)
-i - B)
--limit - C)
-L - D)
-e - E)
--existing - F)
--follow - G) All of these
Answer: G
Q2) Does the Locate Command Internally Use a Database to Find Results?
Options:
- True
- False
Answer: True
Q3) We Created a File Called demo.txt. It Has Been 2 Hours Since the Locate Database Was Last Updated. Is the Locate Command Able to Find This demo.txt?
Options:
- A) Yes
- B) No
Answer: B (No)
Q4) How to Update the Database Used by the Locate Command?
Options:
- A)
update locatedb - B)
updatedb - C)
sudo updatedb
Answer: C