A very important detail if you mount anything on /media
Use locate across external devices in Linux
December 5th, 2010 by T4L
By default, updatedb indexes only your root partition when run. To be able to extend locate’s reach and get updatedb to index external devices such as USB harddisks and flash drives, edit the /etc/updatedb.conf file. Modify the following line:
PRUNEPATHS=”/tmp /var/spool /media”
so that it reads
PRUNEPATHS=”/tmp /var/spool”
This adds the devices mounted in the /media directory to the search path.
Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.
Hi, Be the first leave some reply
Leave A Reply
I keep my user folders on /media/ DATA which until now has meant that I haven’t been using the ‘locate’ command properly. Little wonder then, that this has frustrated me no end.
An excellent article with some great Linux tricks
Every now and then I come across an article with a really handy tip. Today’s link is full of them!
musicfetcher.py : A python script to fetch music from freemusicarchive.org
Any advice would be appreciated: #!/usr/bin/python
#findurl.py
#Released under a GPLv3 Licence by Clockwork PC import os
H = os.getenv("HOME") #Get the lines in the file that contain the URL substrings
for line in open("/home/clockworkpcasus/Music/freemusicarchive.org/index.html"):
if "http://freemusicarchive.org/music/download" in line:
print line
#Create a BASH script in ~/Documents/bin
os.system("cpcbash.sh") #Move the newly created script into ~/Music/freemusicarchive.org
os.system("cd ~/Documents/bin && mv `ls -alt | grep sh | head -n 1 | awk '{print $8}'` ~/Music/freemusicarchive.org/musicfetcher.sh") #Make musicfetcher.sh executable
os.system("chmod +x ~/Music/freemusicarchive.org/musicfetcher.sh") #Copy the URL substrings into ~/Music/freemusicarchive.org/musicfetcher.sh #Turn each URL substring into the following: gnome-terminal -x wget http://freemusicarchive.org/Download/Music... etc. #Save ~/Music/freemusicarchive.org/musicfetcher.sh #Execute the script
os.system("/bin/bash ~/Music/freemusicarchive.org/musicfetcher.sh"
The Clockwork PC BASH script generator
How to get the ultimate screenshot functionality in Ubuntu with Compiz, Pinta, and our old friend BASH