Ubuntu `system search` another drive
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
One thing I like Ubuntu compared to other distro is it's capability to do quick search.
I've been looking for everything
(Windows tool) alternative for quite sometimes and it seems like this is the best at the moment.
However, this Ubuntu system search
only search a local drive installed with the OS.
It doesn't search another physical drive.
Would it be possible to do this?
18.04 windows search
add a comment |
One thing I like Ubuntu compared to other distro is it's capability to do quick search.
I've been looking for everything
(Windows tool) alternative for quite sometimes and it seems like this is the best at the moment.
However, this Ubuntu system search
only search a local drive installed with the OS.
It doesn't search another physical drive.
Would it be possible to do this?
18.04 windows search
add a comment |
One thing I like Ubuntu compared to other distro is it's capability to do quick search.
I've been looking for everything
(Windows tool) alternative for quite sometimes and it seems like this is the best at the moment.
However, this Ubuntu system search
only search a local drive installed with the OS.
It doesn't search another physical drive.
Would it be possible to do this?
18.04 windows search
One thing I like Ubuntu compared to other distro is it's capability to do quick search.
I've been looking for everything
(Windows tool) alternative for quite sometimes and it seems like this is the best at the moment.
However, this Ubuntu system search
only search a local drive installed with the OS.
It doesn't search another physical drive.
Would it be possible to do this?
18.04 windows search
18.04 windows search
asked Apr 4 at 6:37
SabrinaSabrina
22618
22618
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Ubuntu uses a local database for this. locatedb is one version of this and it has a configuration file located at /etc/updatedb.conf
.
Contents:
$ more /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660
ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs
udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
As you can tell for this lots of locations are not added to the indexing.
This is an example of a method to add a path when you use locatedb:
updatedb --localpaths '/ /media/usbdrive/dir/Music /media/usbdrive/dir/Photos'
I am not sure if needed but
sudo updatedb
will recreate the database by scanning your discs in case an alteration does not trigger it.
add a comment |
Have your other drives and partitions auto-mounted in your /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8 /boot/efi vfat umask=0077 0 1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
UUID=F03ED48E3ED44F6A /mnt/d ntfs-3g permissions,locale=en_US.utf8 0 0
UUID=5CCC5867CC583E08 /mnt/c ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old ext4 x-gvfs-show 0 0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone ext4 x-gvfs-show 0 0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none swap sw 0 0
All of them will automatically be indexed for quick search. For example:
$ time locate .bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/rick/.bashrc
/home/rick/.bashrc~
/home/rick/restore/.bashrc
/home/rick/restore/.bashrc~
/mnt/clone/etc/bash.bashrc
/mnt/clone/etc/skel/.bashrc
/mnt/clone/home/rick/.bashrc
/mnt/clone/home/rick/.bashrc~
/mnt/clone/home/rick/eyesome/.bashrc
/mnt/clone/home/rick/restore/.bashrc
/mnt/clone/home/rick/restore/.bashrc~
/mnt/clone/usr/share/base-files/dot.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/mnt/e/.bashrc
/mnt/e/Temporary Work/.bashrc
/mnt/old/etc/bash.bashrc
/mnt/old/etc/skel/.bashrc
/mnt/old/home/rick/.bashrc
/mnt/old/home/rick/.bashrc~
/mnt/old/usr/share/base-files/dot.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
real 0m0.868s
user 0m0.852s
sys 0m0.017s
Even Windows files are indexed:
$ time locate /cmd.exe
/mnt/c/Windows/SysWOW64/cmd.exe
/mnt/c/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/c/Windows/System32/cmd.exe
/mnt/c/Windows/System32/en-US/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_65026a8ffb1498f6/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_708d53148386ef59/cmd.exe
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_6f5714e22f755af1/cmd.exe.mui
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_7ae1fd66b7e7b154/cmd.exe
/mnt/d/Windows/SysWOW64/cmd.exe
/mnt/d/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/d/Windows/System32/cmd.exe
/mnt/d/Windows/System32/en-US/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_0c0776913c41663d/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_17925f15c4b3bca0/cmd.exe
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_165c20e370a22838/cmd.exe.mui
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_21e70967f9147e9b/cmd.exe
real 0m0.989s
user 0m0.980s
sys 0m0.008s
I added the time
command so you can see how it takes less than a second. For a count of all the files indexed use:
$ time locate * | wc -l
625125
real 0m39.088s
user 0m38.644s
sys 0m0.423s
It takes 39
seconds to list 625,125 file names and count them.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131091%2fubuntu-system-search-another-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ubuntu uses a local database for this. locatedb is one version of this and it has a configuration file located at /etc/updatedb.conf
.
Contents:
$ more /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660
ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs
udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
As you can tell for this lots of locations are not added to the indexing.
This is an example of a method to add a path when you use locatedb:
updatedb --localpaths '/ /media/usbdrive/dir/Music /media/usbdrive/dir/Photos'
I am not sure if needed but
sudo updatedb
will recreate the database by scanning your discs in case an alteration does not trigger it.
add a comment |
Ubuntu uses a local database for this. locatedb is one version of this and it has a configuration file located at /etc/updatedb.conf
.
Contents:
$ more /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660
ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs
udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
As you can tell for this lots of locations are not added to the indexing.
This is an example of a method to add a path when you use locatedb:
updatedb --localpaths '/ /media/usbdrive/dir/Music /media/usbdrive/dir/Photos'
I am not sure if needed but
sudo updatedb
will recreate the database by scanning your discs in case an alteration does not trigger it.
add a comment |
Ubuntu uses a local database for this. locatedb is one version of this and it has a configuration file located at /etc/updatedb.conf
.
Contents:
$ more /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660
ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs
udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
As you can tell for this lots of locations are not added to the indexing.
This is an example of a method to add a path when you use locatedb:
updatedb --localpaths '/ /media/usbdrive/dir/Music /media/usbdrive/dir/Photos'
I am not sure if needed but
sudo updatedb
will recreate the database by scanning your discs in case an alteration does not trigger it.
Ubuntu uses a local database for this. locatedb is one version of this and it has a configuration file located at /etc/updatedb.conf
.
Contents:
$ more /etc/updatedb.conf
PRUNE_BIND_MOUNTS="yes"
# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660
ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs
udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
As you can tell for this lots of locations are not added to the indexing.
This is an example of a method to add a path when you use locatedb:
updatedb --localpaths '/ /media/usbdrive/dir/Music /media/usbdrive/dir/Photos'
I am not sure if needed but
sudo updatedb
will recreate the database by scanning your discs in case an alteration does not trigger it.
answered Apr 4 at 7:05
RinzwindRinzwind
211k28406541
211k28406541
add a comment |
add a comment |
Have your other drives and partitions auto-mounted in your /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8 /boot/efi vfat umask=0077 0 1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
UUID=F03ED48E3ED44F6A /mnt/d ntfs-3g permissions,locale=en_US.utf8 0 0
UUID=5CCC5867CC583E08 /mnt/c ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old ext4 x-gvfs-show 0 0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone ext4 x-gvfs-show 0 0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none swap sw 0 0
All of them will automatically be indexed for quick search. For example:
$ time locate .bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/rick/.bashrc
/home/rick/.bashrc~
/home/rick/restore/.bashrc
/home/rick/restore/.bashrc~
/mnt/clone/etc/bash.bashrc
/mnt/clone/etc/skel/.bashrc
/mnt/clone/home/rick/.bashrc
/mnt/clone/home/rick/.bashrc~
/mnt/clone/home/rick/eyesome/.bashrc
/mnt/clone/home/rick/restore/.bashrc
/mnt/clone/home/rick/restore/.bashrc~
/mnt/clone/usr/share/base-files/dot.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/mnt/e/.bashrc
/mnt/e/Temporary Work/.bashrc
/mnt/old/etc/bash.bashrc
/mnt/old/etc/skel/.bashrc
/mnt/old/home/rick/.bashrc
/mnt/old/home/rick/.bashrc~
/mnt/old/usr/share/base-files/dot.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
real 0m0.868s
user 0m0.852s
sys 0m0.017s
Even Windows files are indexed:
$ time locate /cmd.exe
/mnt/c/Windows/SysWOW64/cmd.exe
/mnt/c/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/c/Windows/System32/cmd.exe
/mnt/c/Windows/System32/en-US/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_65026a8ffb1498f6/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_708d53148386ef59/cmd.exe
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_6f5714e22f755af1/cmd.exe.mui
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_7ae1fd66b7e7b154/cmd.exe
/mnt/d/Windows/SysWOW64/cmd.exe
/mnt/d/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/d/Windows/System32/cmd.exe
/mnt/d/Windows/System32/en-US/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_0c0776913c41663d/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_17925f15c4b3bca0/cmd.exe
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_165c20e370a22838/cmd.exe.mui
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_21e70967f9147e9b/cmd.exe
real 0m0.989s
user 0m0.980s
sys 0m0.008s
I added the time
command so you can see how it takes less than a second. For a count of all the files indexed use:
$ time locate * | wc -l
625125
real 0m39.088s
user 0m38.644s
sys 0m0.423s
It takes 39
seconds to list 625,125 file names and count them.
add a comment |
Have your other drives and partitions auto-mounted in your /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8 /boot/efi vfat umask=0077 0 1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
UUID=F03ED48E3ED44F6A /mnt/d ntfs-3g permissions,locale=en_US.utf8 0 0
UUID=5CCC5867CC583E08 /mnt/c ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old ext4 x-gvfs-show 0 0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone ext4 x-gvfs-show 0 0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none swap sw 0 0
All of them will automatically be indexed for quick search. For example:
$ time locate .bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/rick/.bashrc
/home/rick/.bashrc~
/home/rick/restore/.bashrc
/home/rick/restore/.bashrc~
/mnt/clone/etc/bash.bashrc
/mnt/clone/etc/skel/.bashrc
/mnt/clone/home/rick/.bashrc
/mnt/clone/home/rick/.bashrc~
/mnt/clone/home/rick/eyesome/.bashrc
/mnt/clone/home/rick/restore/.bashrc
/mnt/clone/home/rick/restore/.bashrc~
/mnt/clone/usr/share/base-files/dot.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/mnt/e/.bashrc
/mnt/e/Temporary Work/.bashrc
/mnt/old/etc/bash.bashrc
/mnt/old/etc/skel/.bashrc
/mnt/old/home/rick/.bashrc
/mnt/old/home/rick/.bashrc~
/mnt/old/usr/share/base-files/dot.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
real 0m0.868s
user 0m0.852s
sys 0m0.017s
Even Windows files are indexed:
$ time locate /cmd.exe
/mnt/c/Windows/SysWOW64/cmd.exe
/mnt/c/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/c/Windows/System32/cmd.exe
/mnt/c/Windows/System32/en-US/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_65026a8ffb1498f6/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_708d53148386ef59/cmd.exe
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_6f5714e22f755af1/cmd.exe.mui
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_7ae1fd66b7e7b154/cmd.exe
/mnt/d/Windows/SysWOW64/cmd.exe
/mnt/d/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/d/Windows/System32/cmd.exe
/mnt/d/Windows/System32/en-US/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_0c0776913c41663d/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_17925f15c4b3bca0/cmd.exe
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_165c20e370a22838/cmd.exe.mui
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_21e70967f9147e9b/cmd.exe
real 0m0.989s
user 0m0.980s
sys 0m0.008s
I added the time
command so you can see how it takes less than a second. For a count of all the files indexed use:
$ time locate * | wc -l
625125
real 0m39.088s
user 0m38.644s
sys 0m0.423s
It takes 39
seconds to list 625,125 file names and count them.
add a comment |
Have your other drives and partitions auto-mounted in your /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8 /boot/efi vfat umask=0077 0 1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
UUID=F03ED48E3ED44F6A /mnt/d ntfs-3g permissions,locale=en_US.utf8 0 0
UUID=5CCC5867CC583E08 /mnt/c ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old ext4 x-gvfs-show 0 0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone ext4 x-gvfs-show 0 0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none swap sw 0 0
All of them will automatically be indexed for quick search. For example:
$ time locate .bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/rick/.bashrc
/home/rick/.bashrc~
/home/rick/restore/.bashrc
/home/rick/restore/.bashrc~
/mnt/clone/etc/bash.bashrc
/mnt/clone/etc/skel/.bashrc
/mnt/clone/home/rick/.bashrc
/mnt/clone/home/rick/.bashrc~
/mnt/clone/home/rick/eyesome/.bashrc
/mnt/clone/home/rick/restore/.bashrc
/mnt/clone/home/rick/restore/.bashrc~
/mnt/clone/usr/share/base-files/dot.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/mnt/e/.bashrc
/mnt/e/Temporary Work/.bashrc
/mnt/old/etc/bash.bashrc
/mnt/old/etc/skel/.bashrc
/mnt/old/home/rick/.bashrc
/mnt/old/home/rick/.bashrc~
/mnt/old/usr/share/base-files/dot.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
real 0m0.868s
user 0m0.852s
sys 0m0.017s
Even Windows files are indexed:
$ time locate /cmd.exe
/mnt/c/Windows/SysWOW64/cmd.exe
/mnt/c/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/c/Windows/System32/cmd.exe
/mnt/c/Windows/System32/en-US/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_65026a8ffb1498f6/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_708d53148386ef59/cmd.exe
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_6f5714e22f755af1/cmd.exe.mui
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_7ae1fd66b7e7b154/cmd.exe
/mnt/d/Windows/SysWOW64/cmd.exe
/mnt/d/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/d/Windows/System32/cmd.exe
/mnt/d/Windows/System32/en-US/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_0c0776913c41663d/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_17925f15c4b3bca0/cmd.exe
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_165c20e370a22838/cmd.exe.mui
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_21e70967f9147e9b/cmd.exe
real 0m0.989s
user 0m0.980s
sys 0m0.008s
I added the time
command so you can see how it takes less than a second. For a count of all the files indexed use:
$ time locate * | wc -l
625125
real 0m39.088s
user 0m38.644s
sys 0m0.423s
It takes 39
seconds to list 625,125 file names and count them.
Have your other drives and partitions auto-mounted in your /etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=b40b3925-70ef-447f-923e-1b05467c00e7 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=D656-F2A8 /boot/efi vfat umask=0077 0 1
# Windows drives C, D & E
UUID=F2C2ACE4C2ACADF3 /mnt/e ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
UUID=F03ED48E3ED44F6A /mnt/d ntfs-3g permissions,locale=en_US.utf8 0 0
UUID=5CCC5867CC583E08 /mnt/c ntfs-3g permissions,locale=en_US.utf8,x-gvfs-show 0 0
# Broken Ubuntu 16.04
UUID=f3f8e7bc-b337-4194-88b8-3a513f6be55b /mnt/old ext4 x-gvfs-show 0 0
# Clone Ubuntu 18.04
UUID=8337e8c8-6461-44f2-b5fe-dfd5b6b05883 /mnt/clone ext4 x-gvfs-show 0 0
# swap was on /dev/nvme0n1p9 during installation
UUID=b4512bc6-0ec8-4b17-9edd-88db0f031332 none swap sw 0 0
All of them will automatically be indexed for quick search. For example:
$ time locate .bashrc
/etc/bash.bashrc
/etc/skel/.bashrc
/home/rick/.bashrc
/home/rick/.bashrc~
/home/rick/restore/.bashrc
/home/rick/restore/.bashrc~
/mnt/clone/etc/bash.bashrc
/mnt/clone/etc/skel/.bashrc
/mnt/clone/home/rick/.bashrc
/mnt/clone/home/rick/.bashrc~
/mnt/clone/home/rick/eyesome/.bashrc
/mnt/clone/home/rick/restore/.bashrc
/mnt/clone/home/rick/restore/.bashrc~
/mnt/clone/usr/share/base-files/dot.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/clone/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/mnt/e/.bashrc
/mnt/e/Temporary Work/.bashrc
/mnt/old/etc/bash.bashrc
/mnt/old/etc/skel/.bashrc
/mnt/old/home/rick/.bashrc
/mnt/old/home/rick/.bashrc~
/mnt/old/usr/share/base-files/dot.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/mnt/old/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
real 0m0.868s
user 0m0.852s
sys 0m0.017s
Even Windows files are indexed:
$ time locate /cmd.exe
/mnt/c/Windows/SysWOW64/cmd.exe
/mnt/c/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/c/Windows/System32/cmd.exe
/mnt/c/Windows/System32/en-US/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_65026a8ffb1498f6/cmd.exe.mui
/mnt/c/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_708d53148386ef59/cmd.exe
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.17134.1_en-us_6f5714e22f755af1/cmd.exe.mui
/mnt/c/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.17134.1_none_7ae1fd66b7e7b154/cmd.exe
/mnt/d/Windows/SysWOW64/cmd.exe
/mnt/d/Windows/SysWOW64/en-US/cmd.exe.mui
/mnt/d/Windows/System32/cmd.exe
/mnt/d/Windows/System32/en-US/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_0c0776913c41663d/cmd.exe.mui
/mnt/d/Windows/WinSxS/amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_17925f15c4b3bca0/cmd.exe
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-c..andprompt.resources_31bf3856ad364e35_10.0.10586.0_en-us_165c20e370a22838/cmd.exe.mui
/mnt/d/Windows/WinSxS/wow64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.10586.0_none_21e70967f9147e9b/cmd.exe
real 0m0.989s
user 0m0.980s
sys 0m0.008s
I added the time
command so you can see how it takes less than a second. For a count of all the files indexed use:
$ time locate * | wc -l
625125
real 0m39.088s
user 0m38.644s
sys 0m0.423s
It takes 39
seconds to list 625,125 file names and count them.
answered Apr 4 at 22:42
WinEunuuchs2UnixWinEunuuchs2Unix
48.4k1197187
48.4k1197187
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131091%2fubuntu-system-search-another-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown