Score:0

Use locate (or find) command to locate files on Windows partition from Ubuntu

np flag

I use the locate command quite heavily to search for files on my system and I think it works quite well for me.

I am now on a system with a double partition (Windows and Ubuntu) and I would like also to be able to locate files on my Windows partition.

I tried to do

sudo updatedb

locate FILETOBEFOUND

but it does not work. Do you know if there is a way to make it work? Is maybe the find command a better option for what I want to do. I tried that too but without success.

EDIT: the windows partition is NTFS and I can access it from the file explorer

David avatar
cn flag
First what is the file system of the Windows part? Can you access the Windows part with the file manager? What is the version of Ubuntu?
PonJar avatar
in flag
Have you mounted the Windows partition?
pLumo avatar
in flag
Check `/etc/updatedb.conf` if the file system, the windows partition is mounted with is in `PRUNEFS` variable.
desmond13 avatar
np flag
Thanks for the comments. I edited my question: I am able to access my Windows NTFS partition.
hr flag
... Windows partitions are often user-mounted in `/media` in which case `PRUNEPATHS` may be a factor here as well
desmond13 avatar
np flag
I can access my partition in the `/media` folder (more specifically `/media/USERNAME/Windows/` and I checked the PRUNEPATHS which indeed contains the `/media` folder but I still cannot locate the files on the Windows Partition. I even tried to put the folder `/media/schianof/Windows/`in the PRUNEPATHS variable without success.
hr flag
@desmond13 you would need to *remove* `/media` from `PRUNEPATHS` (and re-run `sudo updatedb`)
desmond13 avatar
np flag
LOL, sorry, I meant that I removed it. But forgot to run `sudo updatedb`
desmond13 avatar
np flag
It works now after doing `sudo updatedb`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.