How to get slocate working
How to get slocate working
SalixLive-64
How can one get slocate working and by the same matter updatedb?
If I give the commands nothing happens as user one and as well as sudo.
I reinstalled with format ext3. It is really great now with no limits on persistent.
How can one get slocate working and by the same matter updatedb?
If I give the commands nothing happens as user one and as well as sudo.
I reinstalled with format ext3. It is really great now with no limits on persistent.
Re: How to get slocate working
Code: Select all
sudo slocate -u
Re: How to get slocate working
Does SalixLive64 not contain the file /etc/cron.daily/slocate?Atip wrote:SalixLive-64
How can one get slocate working and by the same matter updatedb?
If I give the commands nothing happens as user one and as well as sudo.
In Salix64 14.2, this file contains:
Code: Select all
#!/bin/sh
ionice -c3 nice -n 19 /usr/bin/updatedb -c /etc/updatedb.conf
Code: Select all
# /etc/updatedb.conf: slocate configuration file
PRUNEFS="devpts NFS nfs afs proc smbfs autofs iso9660 udf tmpfs cifs"
PRUNEPATHS="/dev /proc /sys /tmp /usr/tmp /var/tmp /afs /net /media /mnt"
export PRUNEFS
export PRUNEPATHS
Re: How to get slocate working
Nothing doingmimosa wrote:Code: Select all
sudo slocate -u
Entering the command it immediately goes back to command line
when normally it would take some time to updatedb.
The same is the case for "locate whatever". Immediately
back to command line and nothing located.
Yes westms, all those files and contents are there.
Here is the output of strace:
Code: Select all
one[Desktop]$ sudo strace slocate dillo
Password:
execve("/usr/bin/slocate", ["slocate", "dillo"], [/* 20 vars */]) = 0
brk(NULL) = 0x23e0000
fcntl(0, F_GETFD) = 0
fcntl(1, F_GETFD) = 0
fcntl(2, F_GETFD) = 0
access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f933ae91000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=131807, ...}) = 0
mmap(NULL, 131807, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f933ae70000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\10\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2076848, ...}) = 0
mmap(NULL, 3967456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f933a8a5000
mprotect(0x7f933aa65000, 2093056, PROT_NONE) = 0
mmap(0x7f933ac64000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f933ac64000
mmap(0x7f933ac6a000, 14816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f933ac6a000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f933ae6f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f933ae6e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f933ae6d000
arch_prctl(ARCH_SET_FS, 0x7f933ae6e700) = 0
mprotect(0x7f933ac64000, 16384, PROT_READ) = 0
mprotect(0x7f933ae92000, 4096, PROT_READ) = 0
munmap(0x7f933ae70000, 131807) = 0
brk(NULL) = 0x23e0000
brk(0x2401000) = 0x2401000
getuid() = 0
getgid() = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1083, ...}) = 0
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 1024) = 1024
read(3, "s: files\n\nautomount: fi"..., 1024) = 59
read(3, "", 1024) = 0
close(3) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=131807, ...}) = 0
mmap(NULL, 131807, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f933ae70000
close(3) = 0
open("/lib64/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=41944, ...}) = 0
mmap(NULL, 2131040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f933a69c000
mprotect(0x7f933a6a4000, 2093056, PROT_NONE) = 0
mmap(0x7f933a8a3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f933a8a3000
close(3) = 0
open("/lib64/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P?\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=114320, ...}) = 0
mmap(NULL, 2202168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f933a482000
mprotect(0x7f933a498000, 2097152, PROT_NONE) = 0
mmap(0x7f933a698000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f933a698000
mmap(0x7f933a69a000, 6712, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f933a69a000
close(3) = 0
mprotect(0x7f933a698000, 4096, PROT_READ) = 0
mprotect(0x7f933a8a3000, 4096, PROT_READ) = 0
munmap(0x7f933ae70000, 131807) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=131807, ...}) = 0
mmap(NULL, 131807, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f933ae70000
close(3) = 0
open("/lib64/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=55920, ...}) = 0
mmap(NULL, 2143624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f933a276000
mprotect(0x7f933a281000, 2093056, PROT_NONE) = 0
mmap(0x7f933a480000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f933a480000
close(3) = 0
open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=56056, ...}) = 0
mmap(NULL, 2168600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f933a064000
mprotect(0x7f933a06f000, 2093056, PROT_NONE) = 0
mmap(0x7f933a26e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f933a26e000
mmap(0x7f933a270000, 22296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f933a270000
close(3) = 0
mprotect(0x7f933a26e000, 4096, PROT_READ) = 0
mprotect(0x7f933a480000, 4096, PROT_READ) = 0
munmap(0x7f933ae70000, 131807) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=748, ...}) = 0
mmap(NULL, 748, PROT_READ, MAP_SHARED, 3, 0) = 0x7f933ae90000
lseek(3, 748, SEEK_SET) = 748
munmap(0x7f933ae90000, 748) = 0
close(3) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=748, ...}) = 0
mmap(NULL, 748, PROT_READ, MAP_SHARED, 3, 0) = 0x7f933ae90000
lseek(3, 748, SEEK_SET) = 748
munmap(0x7f933ae90000, 748) = 0
close(3) = 0
stat("/var/lib/slocate/slocate.db", {st_mode=S_IFREG|0640, st_size=1, ...}) = 0
getegid() = 21
stat("/var/lib/slocate/slocate.db", {st_mode=S_IFREG|0640, st_size=1, ...}) = 0
open("/var/lib/slocate/slocate.db", O_RDONLY) = 3
read(3, "1", 1) = 1
read(3, "", 4096) = 0
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++
one[Desktop]$
Re: How to get slocate working
Type
Wait until finish. Then type
Code: Select all
sudo updatedb
Code: Select all
locate program-name-to-find
Re: How to get slocate working
As I have mentioned in all previous posts
It does not work!
If it would work strace would show a lot of "dillo" locations.
It does not show a single one. And strace output would be much much longer.
What I posted is the entire output.
Portion of strace in Slint.
No such showing of dillo in strace of previous post;
since it does not work.
There is no updated db no matter how long I will wait after giving command since
no updating is taking place.
I am using slocate since more than 20 years in Linux so I know what I am doing one should assume.
It does not work!
If it would work strace would show a lot of "dillo" locations.
It does not show a single one. And strace output would be much much longer.
What I posted is the entire output.
Portion of strace in Slint.
Code: Select all
sudo strace slocate dillo
....snip....
access("/home/guest", R_OK) = 0
access("/home", R_OK) = 0
lstat64("/home/guest/.dillo/keysrc", {st_mode=S_IFREG|0644, st_size=2587, ...}) = 0
access("/home/guest/.dillo/keysrc", F_OK) = 0
access("/home/guest/.dillo", R_OK) = 0
access("/home/guest", R_OK) = 0
access("/home", R_OK) = 0
lstat64("/home/guest/.dillo/bm.txt.bak", {st_mode=S_IFREG|0600, st_size=9456, ...}) = 0
access("/home/guest/.dillo/bm.txt.bak", F_OK) = 0
access("/home/guest/.dillo", R_OK) = 0
access("/home/guest", R_OK) = 0
access("/home", R_OK) = 0
lstat64("/home/guest/.dillo/dpid_comm_keys", {st_mode=S_IFREG|0600, st_size=14, ...}) = 0
access("/home/guest/.dillo/dpid_comm_keys", F_OK) = 0
access("/home/guest/.dillo", R_OK) = 0
access("/home/guest", R_OK) = 0
access("/home", R_OK) = 0
lstat64("/home/guest/.dillo/bm.txt", {st_mode=S_IFREG|0600, st_size=9379, ...}) = 0
access("/home/guest/.dillo/bm.txt", F_OK) = 0
access("/home/guest/.dillo", R_OK) = 0
....snip...
since it does not work.
There is no updated db no matter how long I will wait after giving command since
no updating is taking place.
I am using slocate since more than 20 years in Linux so I know what I am doing one should assume.
Re: How to get slocate working
To compare with Salix64 14.2:Atip wrote:As I have mentioned in all previous posts
It does not work!
Is the database /var/lib/slocate/slocate.db renewed when you use the call
Code: Select all
sudo /usr/bin/updatedb -c /etc/updatedb.conf
? With me, yes.
Also the call
Code: Select all
sudo /usr/bin/updatedb -c /etc/updatedb.conf firefox
The processes are done in silence. With me the database is renewed every time.
Then
Code: Select all
sudo slocate -c /etc/updatedb.conf
Code: Select all
sudo slocate -c /etc/updatedb.conf firefox
Called as
Code: Select all
sudo slocate -u -c /etc/updatedb.conf
Code: Select all
sudo slocate -u -c /etc/updatedb.conf firefox
The explanation for the difference between updatedb and slocate: When slocate is called as updatedb, the -u option is implied.
More than 20 years? Maybe you just got lost in an age-related memory gap as far as the use of the command is concerned? :)Atip wrote:I am using slocate since more than 20 years in Linux so I know what I am doing one should assume. ;)
Is this SalixLive64 installed on HDD/SSD or is it booted from a memory stick?
If the latter is true, are you sure /var/lib/slocate/slocate.db is changeable?
Re: How to get slocate working
To run updatedb it takes usually several seconds to several minutes
to complete depending on the size of the partition.
For example in my Slint-64 it takes 125 sec.
In my Slackel-Openbox 35 sec.
In my Slackel-Live-Openbox 20 sec.
IN SALIXLlIVE-64 IT TAKES A FRACTION OF A SECOND
even so it is rather large. That is because it does not work AT ALL.
I am closing now this discussion since it does not seem to lead anywhere.
Thanks everyone!
And I wish westms that he will have my memory if he will ever reach my age.
to complete depending on the size of the partition.
For example in my Slint-64 it takes 125 sec.
In my Slackel-Openbox 35 sec.
In my Slackel-Live-Openbox 20 sec.
IN SALIXLlIVE-64 IT TAKES A FRACTION OF A SECOND
even so it is rather large. That is because it does not work AT ALL.
I am closing now this discussion since it does not seem to lead anywhere.
Thanks everyone!
And I wish westms that he will have my memory if he will ever reach my age.
-
- Posts: 518
- Joined: 20. Jun 2016, 20:15
Re: How to get slocate working
Do you run it in RAM, without persistence?Atip wrote:IN SALIXLlIVE-64 IT TAKES A FRACTION OF A SECOND
even so it is rather large. That is because it does not work AT ALL.
If yes, to 100% sure run updatedb then try "slocate <name>", <name> being the name of a file of which you are sure that it exists.
EDIT. I think that updatedb just does not include in its database files in RAM. I just tried that on Slint:
Code: Select all
didier[/dev/shm/didier]$ su
root's Password:
root[/dev/shm/didier]# updatedb
root[/dev/shm/didier]# locate at-spi2-HA71AZ
root[/dev/shm/didier]# exit
didier[/dev/shm/didier]$ ls |grep at-spi2-HA71AZ
at-spi2-HA71AZ
didier[/dev/shm/didier]$ locate at-spi2-HA71AZ
didier[/dev/shm/didier]$ locate Musique
/home/nouveau/Musique
/home/didier/Musique
/old/home/didier/Musique
didier[/dev/shm/didier]$
Re: How to get slocate working
No, I do no not run it RAM, have not enough memory.
There comes to mind could it be that memory is short
to run slocate?
There comes to mind could it be that memory is short
to run slocate?
Code: Select all
one[Desktop]$ free
total used free shared buff/cache available
Mem: 2029564 223588 1217240 58216 588736 1441152
Swap: 0 0 0