[oS-en] How to turn off wifi on terminal (not nmcli) [and solved]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have just upgraded my miniserver to 15.3. The wifi has turned automatically off, and I don't remember how to turn it off in the CLI. The command has rotated out of the command history. Problem is this noise: 0.4> 2023-03-05T21:10:26.569573+01:00 Isengard kernel - - - [ 3646.480233] IPv4: martian source 192.168.255.255 from 192.168.1.16, on dev wlan0 <0.4> 2023-03-05T21:10:26.569578+01:00 Isengard kernel - - - [ 3646.480247] ll header: 00000000: ff ff ff ff ff ff 4c cc 6a 61 50 a1 08 00 <0.4> 2023-03-05T21:10:26.569580+01:00 Isengard kernel - - - [ 3646.481572] IPv4: martian source 192.168.255.255 from 192.168.1.16, on dev wlan0 <0.4> 2023-03-05T21:10:26.569583+01:00 Isengard kernel - - - [ 3646.481584] ll header: 00000000: ff ff ff ff ff ff 4c cc 6a 61 50 a1 08 00 <0.4> 2023-03-05T21:10:28.409398+01:00 Isengard kernel - - - [ 3648.321785] IPv4: martian source 192.168.255.255 from 192.168.1.16, on dev wlan0 <0.4> 2023-03-05T21:10:28.409440+01:00 Isengard kernel - - - [ 3648.321791] ll header: 00000000: ff ff ff ff ff ff 4c cc 6a 61 50 a1 08 00 I tried: Isengard:~ # iw dev wlan0 disconnect command failed: Operation not permitted (-1) Isengard:~ # It is not network manager. sengard:~ # nmcli radio wifi off Error: NetworkManager is not running. Isengard:~ # iw dev wlan0 [tab][tab] doesn't work. Google search fails. Insist of using the GUI, or NM, or turning it ON. google "turn off wifi on terminal opensuse" FOUND IT! Isengard:~ # ifdown wlan0 wlan0 device-ready Isengard:~ # - -- Cheers Carlos E. R. (from 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZAT5uxwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVkygAoJE3eVF+PRjDPHnwMD0A VpIIl8MdAJ9a5/l3CaQCq86BlkTnFo3qW+eFTg== =m97E -----END PGP SIGNATURE-----
Carlos E. R. wrote:
Hi,
I have just upgraded my miniserver to 15.3. The wifi has turned automatically off, and I don't remember how to turn it off in the CLI. The command has rotated out of the command history.
Problem is this noise:
0.4> 2023-03-05T21:10:26.569573+01:00 Isengard kernel - - - [ 3646.480233] IPv4: martian source 192.168.255.255 from 192.168.1.16,
That seems to suggest you have martian logging on, which I don't think is the default. Try this: find /proc/sys/net -name \*martian\* | xargs cat
FOUND IT!
Isengard:~ # ifdown wlan0 wlan0 device-ready
The "standard" openSUSE way, since roughly forever :-) -- Per Jessen, Zürich (6.6°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-06 11:35, Per Jessen wrote:
Carlos E. R. wrote:
Hi,
I have just upgraded my miniserver to 15.3. The wifi has turned automatically off, and I don't remember how to turn it off in the CLI. The command has rotated out of the command history.
Problem is this noise:
0.4> 2023-03-05T21:10:26.569573+01:00 Isengard kernel - - - [ 3646.480233] IPv4: martian source 192.168.255.255 from 192.168.1.16,
That seems to suggest you have martian logging on, which I don't think is the default.
I don't think I did it myself.
Try this: find /proc/sys/net -name \*martian\* | xargs cat
Isengard:~ # find /proc/sys/net -name \*martian\* | xargs cat 1 1 1 1 1 Isengard:~ #
FOUND IT!
Isengard:~ # ifdown wlan0 wlan0 device-ready
The "standard" openSUSE way, since roughly forever :-)
Nah, the standard way is YaST :-p -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-06 11:35, Per Jessen wrote:
Carlos E. R. wrote:
Hi,
I have just upgraded my miniserver to 15.3. The wifi has turned automatically off, and I don't remember how to turn it off in the CLI. The command has rotated out of the command history.
Problem is this noise:
0.4> 2023-03-05T21:10:26.569573+01:00 Isengard kernel - - - [ 3646.480233] IPv4: martian source 192.168.255.255 from 192.168.1.16,
That seems to suggest you have martian logging on, which I don't think is the default.
I don't think I did it myself.
Try this: find /proc/sys/net -name \*martian\* | xargs cat
Isengard:~ # find /proc/sys/net -name \*martian\* | xargs cat 1 1 1 1 1
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
FOUND IT!
Isengard:~ # ifdown wlan0 wlan0 device-ready
The "standard" openSUSE way, since roughly forever :-)
Nah, the standard way is YaST :-p
I don't think I have used YaST for network config for over fifteen years. -- Per Jessen, Zürich (7.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-07 10:43, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-06 11:35, Per Jessen wrote:
Carlos E. R. wrote:
Hi,
I have just upgraded my miniserver to 15.3. The wifi has turned automatically off, and I don't remember how to turn it off in the CLI. The command has rotated out of the command history.
Problem is this noise:
0.4> 2023-03-05T21:10:26.569573+01:00 Isengard kernel - - - [ 3646.480233] IPv4: martian source 192.168.255.255 from 192.168.1.16,
That seems to suggest you have martian logging on, which I don't think is the default.
I don't think I did it myself.
Try this: find /proc/sys/net -name \*martian\* | xargs cat
Isengard:~ # find /proc/sys/net -name \*martian\* | xargs cat 1 1 1 1 1
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
Both my running this minute machines have "1". Telcontar:~ # l /etc/sysctl* -rw-r--r-- 1 root root 1126 Oct 14 2020 /etc/sysctl.conf -rw-r--r-- 1 root root 1014 Oct 24 2016 /etc/sysctl.conf~ /etc/sysctl.d: total 28 drwxr-xr-x 2 root root 4096 Feb 14 12:58 ./ drwxr-xr-x 243 root root 16384 Mar 4 00:30 ../ -rw-r--r-- 1 root root 29 Jul 18 2019 90-nfs.conf -rw-r--r-- 1 root root 29 Jul 18 2019 90-nfs.conf~ lrwxrwxrwx 1 root root 16 Feb 25 2014 99-sysctl.conf -> /etc/sysctl.conf Telcontar:~ # Telcontar:~ # grep -i martian /etc/sysctl* grep: /etc/sysctl.d: Is a directory Telcontar:~ #
FOUND IT!
Isengard:~ # ifdown wlan0 wlan0 device-ready
The "standard" openSUSE way, since roughly forever :-)
Nah, the standard way is YaST :-p
I don't think I have used YaST for network config for over fifteen years.
Ouch. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 2023-03-07 12:38, Andrei Borzenkov wrote:
On Tue, Mar 7, 2023 at 1:49 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Telcontar:~ # l /etc/sysctl*
If you read "man sysctl.d" you will see the list of paths where sysctl configuration may be located. The above is not the only one.
Too many for checking... I don't want to disable martian checking, I like it. Just curious to know if it is enabled by default or some config enabling it. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-07 12:38, Andrei Borzenkov wrote:
On Tue, Mar 7, 2023 at 1:49 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Telcontar:~ # l /etc/sysctl*
If you read "man sysctl.d" you will see the list of paths where sysctl configuration may be located. The above is not the only one.
Too many for checking...
One command, see my previous posting.
I don't want to disable martian checking, I like it. Just curious to know if it is enabled by default or some config enabling it.
On Leap15.3 it is not enabled by default, no. -- Per Jessen, Zürich (3.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
Both my running this minute machines have "1".
Telcontar:~ # l /etc/sysctl*
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian As Andrei suggests, it might be worth also checking the other locations for sysctl conf files. On a TW system, I see martians being explicitly disabled: /etc/sysctl.d/martians.conf Same on a 15.4 system. That suggests logging of martians was enabled by default at some point. Nothing on 15.3 or 15.1. -- Per Jessen, Zürich (9.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-07 14:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
Both my running this minute machines have "1".
Telcontar:~ # l /etc/sysctl*
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian
Ah. You know that me and find have a history of misunderstandings >:-) Telcontar:~ # find /etc/sysctl* -type f | xargs grep martian Telcontar:~ # find /etc/sysctl* -type f | xargs grep -i martian Telcontar:~ #
As Andrei suggests, it might be worth also checking the other locations for sysctl conf files.
On a TW system, I see martians being explicitly disabled: /etc/sysctl.d/martians.conf
Telcontar:~ # locate martians.conf Telcontar:~ #
Same on a 15.4 system. That suggests logging of martians was enabled by default at some point.
That's possible. This system goes back to 6.3 or so.
Nothing on 15.3 or 15.1.
I wonder why not checking for martians? I don't like the idea of aliens invading me. I must lift a wall or something :-p :-D -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-07 14:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian
Ah. You know that me and find have a history of misunderstandings >:-)
Sorry, no, I don't keep up.
Telcontar:~ # find /etc/sysctl* -type f | xargs grep martian Telcontar:~ # find /etc/sysctl* -type f | xargs grep -i martian
Okay, so there is nothing there to enable the "martian" setting. It is probably worth doing this too, just in case: find /boot/sysctl.conf* /etc/sysctl.d/*.conf /run/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf \ /etc/sysctl.conf -type f | xargs grep martian
Same on a 15.4 system. That suggests logging of martians was enabled by default at some point.
That's possible. This system goes back to 6.3 or so.
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Nothing on 15.3 or 15.1.
I wonder why not checking for martians? I don't like the idea of aliens invading me.
Don't worry, you won't feel a thing. I think the log messages are disabled because the martians are really just stirring up trouble, for no good reason. In most situations. -- Per Jessen, Zürich (4.3°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 14:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
Yes, changing the topic I expect, but new thread has surprised me, and happened with a few threads. Thus I am considering to tell Th to reindex the entire folder, a long operation on remote imap.
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian
Ah. You know that me and find have a history of misunderstandings >:-)
Sorry, no, I don't keep up.
{chuckle} :-D
Telcontar:~ # find /etc/sysctl* -type f | xargs grep martian Telcontar:~ # find /etc/sysctl* -type f | xargs grep -i martian
Okay, so there is nothing there to enable the "martian" setting. It is probably worth doing this too, just in case:
find /boot/sysctl.conf* /etc/sysctl.d/*.conf /run/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf \ /etc/sysctl.conf -type f | xargs grep martian
Telcontar:~ # find /boot/sysctl.conf* /etc/sysctl.d/*.conf \ /run/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf \ /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf \ /etc/sysctl.conf -type f | xargs grep -i martian find: ‘/run/sysctl.d/*.conf’: No such file or directory find: ‘/usr/local/lib/sysctl.d/*.conf’: No such file or directory find: ‘/lib/sysctl.d/*.conf’: No such file or directory Telcontar:~ # Nope.
Same on a 15.4 system. That suggests logging of martians was enabled by default at some point.
That's possible. This system goes back to 6.3 or so.
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Yes, that far back. I did a full reinstall from 5.2 to 6.1 or 6.3, then DVD upgrades since then all the way, with some hardware upgrades in between, including one from 32 to 64 bits. Huh, dunno how to find the oldest dated file in the computer.
Nothing on 15.3 or 15.1.
I wonder why not checking for martians? I don't like the idea of aliens invading me.
Don't worry, you won't feel a thing.
I think the log messages are disabled because the martians are really just stirring up trouble, for no good reason. In most situations.
Isengard:~ # ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.16 netmask 255.255.0.0 broadcast 192.168.255.255 inet6 fe80::4ecc:6aff:fe61:50a1 prefixlen 64 scopeid 0x20<link> inet6 fc00::16 prefixlen 64 scopeid 0x0<global> ether 4c:cc:6a:61:50:a1 txqueuelen 1000 (Ethernet) RX packets 602844 bytes 173311360 (165.2 MiB) RX errors 0 dropped 2407 overruns 0 frame 0 TX packets 709615 bytes 646865585 (616.8 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 233696 bytes 608490880 (580.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 233696 bytes 608490880 (580.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Isengard:~ # ifup wlan0 wlan0 setup-in-progress Isengard:~ # ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.16 netmask 255.255.0.0 broadcast 192.168.255.255 inet6 fe80::4ecc:6aff:fe61:50a1 prefixlen 64 scopeid 0x20<link> inet6 fc00::16 prefixlen 64 scopeid 0x0<global> ether 4c:cc:6a:61:50:a1 txqueuelen 1000 (Ethernet) RX packets 603142 bytes 173343998 (165.3 MiB) RX errors 0 dropped 2410 overruns 0 frame 0 TX packets 709814 bytes 646902811 (616.9 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 233738 bytes 608493834 (580.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 233738 bytes 608493834 (580.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::a2d3:7aff:fe82:b34c prefixlen 64 scopeid 0x20<link> ether a0:d3:7a:82:b3:4c txqueuelen 1000 (Ethernet) RX packets 205 bytes 20975 (20.4 KiB) RX errors 0 dropped 8 overruns 0 frame 0 TX packets 69 bytes 12323 (12.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Isengard:~ # ifdown wlan0 wlan0 device-ready Isengard:~ # Hum. Then I don't remember what was the cause. I know that I left the wlan of the server on "auto", so that I would find out "if/when" my router started handing out IPv6 addresses. <0.4> 2023-03-07T19:16:33.000059+01:00 Isengard kernel - - - [143344.981092][ C1] IPv4: martian source 255.255.255.255 from 192.168.2.3, on dev wlan0 <0.4> 2023-03-07T19:16:33.000117+01:00 Isengard kernel - - - [143344.981110][ C1] ll header: 00000000: ff ff ff ff ff ff 38 80 df 5c 75 b5 08 00 <0.4> 2023-03-07T19:16:38.836074+01:00 Isengard kernel - - - [143350.818085][ C1] IPv4: martian source 255.255.255.255 from 192.168.2.3, on dev wlan0 <0.4> 2023-03-07T19:16:38.836121+01:00 Isengard kernel - - - [143350.818109][ C1] ll header: 00000000: ff ff ff ff ff ff 38 80 df 5c 75 b5 08 00 <0.4> 2023-03-07T19:16:44.980054+01:00 Isengard kernel - - - [143356.962124][ C1] IPv4: martian source 255.255.255.255 from 192.168.2.3, on dev wlan0 <0.4> 2023-03-07T19:16:44.980097+01:00 Isengard kernel - - - [143356.962140][ C1] ll header: 00000000: ff ff ff ff ff ff 38 80 df 5c 75 b5 08 00 192.168.2.3 is something on the dhcp pool. Ah, my second mobile phone. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZAeCtxwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVkuAAn0DugPmz4fW9K+YJknhd XV6HN2jJAJ4hWhQXVAmZ+310vB5zZH0BOV6p+A== =4qBF -----END PGP SIGNATURE-----
Carlos E. R. wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
Yes, changing the topic I expect, but new thread has surprised me,
I didn't get a new thread. (knode nor thunderbird). -- Per Jessen, Zürich (5.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-07 20:12, Per Jessen wrote:
Carlos E. R. wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
Yes, changing the topic I expect, but new thread has surprised me,
I didn't get a new thread. (knode nor thunderbird).
Ok, then it is my th. Or my router + my ISP, making TH loose sync. Thanks for the confirmation. I have to reindex. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-07 20:12, Per Jessen wrote:
Carlos E. R. wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
Yes, changing the topic I expect, but new thread has surprised me,
I didn't get a new thread. (knode nor thunderbird).
Ok, then it is my th. Or my router + my ISP, making TH loose sync. Thanks for the confirmation.
uh, I just realised, both knode and tb just access my news server, so it's probably irrelevant. -- Per Jessen, Zürich (4.7°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-07 20:21, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 20:12, Per Jessen wrote:
Carlos E. R. wrote:
Did you change to new thread? Or is Thunderbird playing antics on me again?
I changed the topic to correspond to the content, that is all.
Yes, changing the topic I expect, but new thread has surprised me,
I didn't get a new thread. (knode nor thunderbird).
Ok, then it is my th. Or my router + my ISP, making TH loose sync. Thanks for the confirmation.
uh, I just realised, both knode and tb just access my news server, so it's probably irrelevant.
I just saw my folder with all mails gone, and then TH started to download them all, some 5 or 6 thousand emails. Twice. And in my gmx account, it is all a single thread. And after reindexing (repairing the folder) the view in telefonica account is also correct. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Tue, 7 Mar 2023 19:30:15 +0100 (CET) On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote:
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Yes, that far back. I did a full reinstall from 5.2 to 6.1 or 6.3, then DVD upgrades since then all the way, with some hardware upgrades in between, including one from 32 to 64 bits. Huh, dunno how to find the oldest dated file in the computer. Your old friend find. This is the "oldest directory" version: root@orion> find / -xdev -type d -print0 | xargs -0 ls -ldt | tail drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/flush drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/hold drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/saved drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/trace drwxr-xr-x 6 root root 4096 2021-07-19 /modgen drwxr-xr-x 2 root root 4096 2021-06-21 /var/lib/ntp/dev drwxr-xr-x 2 ntp ntp 4096 2021-06-21 /var/lib/ntp/drift drwxr-xr-x 26 root root 4096 2021-04-04 /alt drwxr-xr-x 2 root root 4096 2021-03-12 /var/lib/lifecycle drwx------ 2 root root 4096 2006-08-22 /var/lib/xdm/authdir/authfiles root@orion> ;-} But I never upgrade, so my oldest directory isn't that old (though some old files on my home server are much older). -- Bob Rogers http://www.rgrjr.com/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2023-03-07 at 12:39 -0800, Bob Rogers wrote:
On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote:
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Yes, that far back. I did a full reinstall from 5.2 to 6.1 or 6.3, then DVD upgrades since then all the way, with some hardware upgrades in between, including one from 32 to 64 bits.
Huh, dunno how to find the oldest dated file in the computer.
Your old friend find. This is the "oldest directory" version:
Basically an ls -ltr on steroids :-)
root@orion> find / -xdev -type d -print0 | xargs -0 ls -ldt | tail drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/flush drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/hold drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/saved drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/trace drwxr-xr-x 6 root root 4096 2021-07-19 /modgen drwxr-xr-x 2 root root 4096 2021-06-21 /var/lib/ntp/dev drwxr-xr-x 2 ntp ntp 4096 2021-06-21 /var/lib/ntp/drift drwxr-xr-x 26 root root 4096 2021-04-04 /alt drwxr-xr-x 2 root root 4096 2021-03-12 /var/lib/lifecycle drwx------ 2 root root 4096 2006-08-22 /var/lib/xdm/authdir/authfiles root@orion>
;-}
But I never upgrade, so my oldest directory isn't that old (though some old files on my home server are much older).
Telcontar:~ # date --rfc-3339=ns ; find / -xdev -type d -print0 | xargs -0 ls -ldt | tail ; date --rfc-3339=ns 2023-03-07 22:14:47.729163694+01:00 drwx------ 2 postfix postfix 4096 Jul 3 2006 /var/spool/postfix/trace/9 drwx------ 2 509 users 4096 Jul 3 2006 /var/spool/mail/pepe/cur drwx------ 2 509 users 4096 Jul 3 2006 /var/spool/mail/pepe/tmp drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/I drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/H drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/G drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/E drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/D drwxr-xr-x 2 cer root 4096 Jun 19 2005 /windows/C drwxr-xr-x 2 root root 4096 Jun 19 2005 /windows/F 2023-03-07 22:14:52.300273593+01:00 Telcontar:~ # Ah, only directories, and single disk, that's why it is so fast. I need scanning more disks, and files. Telcontar:~ # date --rfc-3339=ns ; find / -print0 | xargs -0 ls -ltr | tail ; date --rfc-3339=ns 2023-03-07 22:19:14.449958485+01:00 ls: cannot read symbolic link '/proc/2/task/2/exe': No such file or directory ls: cannot read symbolic link '/proc/2/exe': No such file or directory ... ls: cannot access '/run/user/1000/doc': Permission denied ls: cannot access '/run/user/1000/gvfs': Permission denied ^[[drwx------ 3 root root 4096 Mar 4 10:07 systemd-private-3ad24dac26fe402e98a55da290a69d9f-rtkit-daemon.service-hn9kqh drwx------ 3 root root 4096 Mar 4 10:08 systemd-private-3ad24dac26fe402e98a55da290a69d9f-power-profiles-daemon.service-IbtUjj drwx------ 3 root root 4096 Mar 4 10:25 systemd-private-3ad24dac26fe402e98a55da290a69d9f-geoclue.service-ZKfThf drwx------ 3 root root 4096 Mar 7 22:12 systemd-private-3ad24dac26fe402e98a55da290a69d9f-ntpd.service-iNEXlj /var/spool/postfix/incoming: total 0 /var/spool/postfix/active: total 0 2023-03-07 22:39:36.495351536+01:00 Telcontar:~ # That output is incorrect. Telcontar:~ # date --rfc-3339=ns ; locate "*" | xargs -0 ls -ltr | tail ; date --rfc-3339=ns 2023-03-07 22:44:33.909178871+01:00 xargs: argument line too long 2023-03-07 22:44:33.912929752+01:00 Telcontar:~ # Sigh... Ok, use "sort" then. Telcontar:~ # date --rfc-3339=ns ; locate "*" | xargs -0 ls -ltr | less -S xargs: argument line too long Wrong aproach. I need to list every file, prepended with date. I think I can do it with some script, or some code of my own in pascal. Telcontar:~ # stat p --printf="%w %n\n" 2019-10-08 13:19:33.159753736 +0200 p Telcontar:~ # Ok... Telcontar:~ # ls . | xargs stat --printf="%w %n\n" stat: invalid option -- 'D' Try 'stat --help' for more information. Telcontar:~ # Where is that D coming from? Ok, I know I can do it with scripts, but not with pipes. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZAe06Bwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVbtQAnAw6ajyrfLRyzYZxajnR KmUw0YysAJ4g3Y5ojinvhXOG4DhRMSBsbEztcg== =/yLq -----END PGP SIGNATURE-----
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Tue, 7 Mar 2023 23:04:23 +0100 (CET) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2023-03-07 at 12:39 -0800, Bob Rogers wrote:
On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote:
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Yes, that far back. I did a full reinstall from 5.2 to 6.1 or 6.3, then DVD upgrades since then all the way, with some hardware upgrades in between, including one from 32 to 64 bits.
Huh, dunno how to find the oldest dated file in the computer.
Your old friend find. This is the "oldest directory" version:
Basically an ls -ltr on steroids :-) Yup, more or less. Ah, only directories, and single disk, that's why it is so fast. I need scanning more disks, and files. Yes, I just wanted a quick demonstration (and my /home is NFS-mounted). . . . Telcontar:~ # ls . | xargs stat --printf="%w %n\n" stat: invalid option -- 'D' Try 'stat --help' for more information. Telcontar:~ # Where is that D coming from? Perhaps a file name in "." that starts with "-" and contains a "D"? I notice that stat seems to accept "--" to denote the start of file name arguments, so maybe if you add "--" to the end of the xargs invocation it will work. -- Bob
Carlos, et al -- ...and then Carlos E. R. said... % % On Tuesday, 2023-03-07 at 12:39 -0800, Bob Rogers wrote: % > On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote: % > ... % > Your old friend find. This is the "oldest directory" version: % % Basically an ls -ltr on steroids :-) % % > root@orion> find / -xdev -type d -print0 | xargs -0 ls -ldt | tail ... % % Telcontar:~ # date --rfc-3339=ns ; find / -xdev -type d -print0 | xargs -0 ls -ldt | tail ; date --rfc-3339=ns This -ldt is correct. ... % % % Ah, only directories, and single disk, that's why it is so fast. I need % scanning more disks, and files. Yes, both -d and -xdev will force that. Good so far. % % Telcontar:~ # date --rfc-3339=ns ; find / -print0 | xargs -0 ls -ltr | tail ; date --rfc-3339=ns % 2023-03-07 22:19:14.449958485+01:00 ... % drwx------ 3 root root 4096 Mar 7 22:12 systemd-private-3ad24dac26fe402e98a55da290a69d9f-ntpd.service-iNEXlj % % /var/spool/postfix/incoming: % total 0 ... % % That output is incorrect. [snip] Weeeellllll ... It may not be what you wanted, but it looks accurate. You changed -ldt to -ltr and so you'll get different results :-) I'll leave off the rest of the sort fun. Be sure to not descend into directories and look properly at the top or bottom of the results to get the oldest, not newest, entries. HTH & Que tenge buen noche :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
On Tue, 7 Mar 2023 23:04:23 +0100 (CET), "Carlos E. R." <robin.listas@telefonica.net> wrote:
On Tuesday, 2023-03-07 at 12:39 -0800, Bob Rogers wrote:
Your old friend find. This is the "oldest directory" version:
Basically an ls -ltr on steroids :-)
root@orion> find / -xdev -type d -print0 | xargs -0 ls -ldt | tail drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/flush drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/hold drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/saved drwx------ 2 postfix root 4096 2021-10-20 /var/spool/postfix/trace drwxr-xr-x 6 root root 4096 2021-07-19 /modgen drwxr-xr-x 2 root root 4096 2021-06-21 /var/lib/ntp/dev drwxr-xr-x 2 ntp ntp 4096 2021-06-21 /var/lib/ntp/drift drwxr-xr-x 26 root root 4096 2021-04-04 /alt drwxr-xr-x 2 root root 4096 2021-03-12 /var/lib/lifecycle drwx------ 2 root root 4096 2006-08-22 /var/lib/xdm/authdir/authfiles root@orion>
;-}
But I never upgrade, so my oldest directory isn't that old (though some old files on my home server are much older).
A possible problem with the result, since find could send very many paths to xargs. If the command line would be too long, xargs will split up the argument list and invoke the command (ls) multiple times. 'tail' will just capture the oldest from the last execution of 'ls', so you might not see the oldest files/directories. You can check that there was only one execution of 'ls' by adding the '-t' option to xargs (echoes the commands generated), and saving stderr: 2>xargs.err Then 'wc -l xargs.err' will tell you how many times 'ls' was invoked, as long as there are no errors. (fat chance) Or, since you now know some of the old files on your system, you can reduce the number of arguments to avoid the problem (not guaranteed): find / -xdev -newer /var/spool/postfix/flush -o -type d -print0 \ | xargs -0 ls -ldt | tail Or go hardcore with a separate sort: (thanks to Bernhard Voelker) TZ=UTC find / -xdev -type d -printf '%TF+%TT%TZ %p\0' \ |LC_COLLATE=C sort -z -k 1,1r -k 2 |tail -z |tr '\0' '\n' |col -bx The 'col' filtering is to make the filenames safe to display. Maybe looking for files, by their status change times, is more informative to find the earliest times of changes on your own system: TZ=UTC find / -xdev -type f -printf '%CF+%CT%CZ %p\0' \ |LC_COLLATE=C sort -z -k 1,1r -k 2 |tail -z |tr '\0' '\n' |col -bx Hint: For more partitions/disks, add start points, but keep the -xdev. -- Robert Webb
On 3/8/23 09:36, Robert Webb wrote:
TZ=UTC find / -xdev -type d -printf '%TF+%TT%TZ %p\0' \ |LC_COLLATE=C sort -z -k 1,1r -k 2 |tail -z |tr '\0' '\n' |col -bx
I'd recommend using '%T@' instead of '%TF+%TT%TZ' for the timestamp part. That'd make the sort(1)ing a bit easier. When using the safer '\0' instead of the usual '\n' as delimiter, the harder part is to process the output correctly further down the receiving side of the pipe: in this case, the timestamp prefix part has to be removed again before passing it to the final command. 'sed -z' is the one for this job. The following just uses { ... } to be able to put inline comments. { # For each file on the "/" root file system, print the timestamp (incl. fractional # part) and the filename, terminated by NULL, e.g. '1677846279.2492195530 /root\0'. find / -xdev -printf '%T@ %p\0' } | { # Sort numerically and reverse on the 1st field (-k1,1nr) in the input # which has zero-terminated lines (-z). LC_ALL=C sort -z -k1,1nr } | { # Just print the last 5 lines - the lines of the oldest 5 ones, still zero-terminated. tail -zn5 } | { # Strip off the leading timestamp in each zero-terminated line. sed -z 's/^.* //' } | { # As an example for a consumer program, pass the zero-terminated entries to `ls -ld`. xargs -0 ls -ld } In short: $ find / -xdev -printf '%T@ %p\0' \ | LC_ALL=C sort -z -k1,1nr \ | tail -zn5 \ | sed -z 's/^.* //' \ | xargs -0 ls -ld -rw-r--r-- 1 root root 644 May 26 1994 /usr/share/doc/packages/procmail/examples/1procmailrc -rw-r--r-- 1 root root 4866 Feb 20 1992 /usr/share/doc/packages/texi2roff/Readme -rw-r--r-- 1 root root 1509 Feb 20 1992 /usr/share/doc/packages/texi2roff/copyright -rw-r--r-- 1 root root 17982 Jun 2 1991 /usr/share/licenses/dvd+rw-tools/LICENSE -rw-r--r-- 1 root root 1536 Jan 1 1970 /usr/share/licenses/python310-scipy/LICENSE.txt Cheers! Have a nice day, Berny
On Thu, 9 Mar 2023 00:17:59 +0100, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 3/8/23 09:36, Robert Webb wrote:
TZ=UTC find / -xdev -type d -printf '%TF+%TT%TZ %p\0' \ |LC_COLLATE=C sort -z -k 1,1r -k 2 |tail -z |tr '\0' '\n' |col -bx
I'd recommend using '%T@' instead of '%TF+%TT%TZ' for the timestamp part. That'd make the sort(1)ing a bit easier.
Yes, it would, but for this, I wanted to not just sort by the time, but to see it in the result also, in a human-readable form. It is interesting to see the dates of the oldest files on a system. Of course, my sorting breaks at the years 10000 and 999.
[...] In short:
$ find / -xdev -printf '%T@ %p\0' \ | LC_ALL=C sort -z -k1,1nr \ | tail -zn5 \ | sed -z 's/^.* //' \ | xargs -0 ls -ld -rw-r--r-- 1 root root 644 May 26 1994 /usr/share/doc/packages/procmail/examples/1procmailrc -rw-r--r-- 1 root root 4866 Feb 20 1992 /usr/share/doc/packages/texi2roff/Readme -rw-r--r-- 1 root root 1509 Feb 20 1992 /usr/share/doc/packages/texi2roff/copyright -rw-r--r-- 1 root root 17982 Jun 2 1991 /usr/share/licenses/dvd+rw-tools/LICENSE -rw-r--r-- 1 root root 1536 Jan 1 1970 /usr/share/licenses/python310-scipy/LICENSE.txt
OK, the 'ls' at the end produces the dates anyway, and also serves to "safe" the filenames for display. Another choice you made was to set LC_ALL=C in the environment for sort, instead of the LC_COLLATE=C that I used. I guess that's a better choice. LC_ALL=C causes all sort comparisons to be byte by byte rather than of UTF-8 characters, right? For sorting, that's good. For display purposes, LC_ALL=C is bad, though. Non-ASCII characters are turned into garbage. I am used to exporting LC_COLLATE=C (as in ~/.profile) so that the output of 'ls' is sorted reasonably, and yet filenames are not munged. -- Robert Webb
On 3/10/23 01:17, Robert Webb wrote:
On Thu, 9 Mar 2023 00:17:59 +0100, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 3/8/23 09:36, Robert Webb wrote:
TZ=UTC find / -xdev -type d -printf '%TF+%TT%TZ %p\0' \ |LC_COLLATE=C sort -z -k 1,1r -k 2 |tail -z |tr '\0' '\n' |col -bx
I'd recommend using '%T@' instead of '%TF+%TT%TZ' for the timestamp part. That'd make the sort(1)ing a bit easier.
Yes, it would, but for this, I wanted to not just sort by the time, but to see it in the result also, in a human-readable form. It is interesting to see the dates of the oldest files on a system. Of course, my sorting breaks at the years 10000 and 999.
Indeed, your proposal saves another post-processing step because find(1) already stat(3)ed the files, while my suggestion just demonstrated exactly that: often, the file names found get passed to another tool in the end - which is a bit tricky in a safe way.
[...] In short:
$ find / -xdev -printf '%T@ %p\0' \ | LC_ALL=C sort -z -k1,1nr \ | tail -zn5 \ | sed -z 's/^.* //' \ | xargs -0 ls -ld
apropos safe: I forgot to pass -r, --no-run-if-empty to the final xargs(1) in the above (just in case the pipe commands before failed to produce some output).
-rw-r--r-- 1 root root 644 May 26 1994 /usr/share/doc/packages/procmail/examples/1procmailrc -rw-r--r-- 1 root root 4866 Feb 20 1992 /usr/share/doc/packages/texi2roff/Readme -rw-r--r-- 1 root root 1509 Feb 20 1992 /usr/share/doc/packages/texi2roff/copyright -rw-r--r-- 1 root root 17982 Jun 2 1991 /usr/share/licenses/dvd+rw-tools/LICENSE -rw-r--r-- 1 root root 1536 Jan 1 1970 /usr/share/licenses/python310-scipy/LICENSE.txt
OK, the 'ls' at the end produces the dates anyway, and also serves to "safe" the filenames for display.
Another choice you made was to set LC_ALL=C in the environment for sort, instead of the LC_COLLATE=C that I used. I guess that's a better choice. LC_ALL=C causes all sort comparisons to be byte by byte rather than of UTF-8 characters, right? For sorting, that's good.
correct, in scripts, it's often a safe choice to run sort(1) with LC_ALL=C. Have a nice day, Berny
From: Robert Webb <webbdg@verizon.net> Date: Wed, 8 Mar 2023 08:36:31 +0000 (UTC) . . . A possible problem with the result, since find could send very many paths to xargs. If the command line would be too long, xargs will split up the argument list and invoke the command (ls) multiple times. 'tail' will just capture the oldest from the last execution of 'ls', so you might not see the oldest files/directories. A very good point. It's edge cases like this that usually force me to go to Perl for the real solution. Which is why I still keep getting tripped up by such edge cases; I use shell scripting mostly in makefiles, so I rarely have to deal with such things, so I mostly forget about them. -- Bob Rogers http://www.rgrjr.com/
On Wed, 8 Mar 2023 18:54:17 -0800, Bob Rogers <rogers@rgrjr.com> wrote:
From: Robert Webb <webbdg@verizon.net> Date: Wed, 8 Mar 2023 08:36:31 +0000 (UTC) . . . A possible problem with the result, since find could send very many paths to xargs. If the command line would be too long, xargs will split up the argument list and invoke the command (ls) multiple times. 'tail' will just capture the oldest from the last execution of 'ls', so you might not see the oldest files/directories.
A very good point. It's edge cases like this that usually force me to go to Perl for the real solution. Which is why I still keep getting tripped up by such edge cases; I use shell scripting mostly in makefiles, so I rarely have to deal with such things, so I mostly forget about them.
Getting tripped up is exactly how I knew that one had to be aware of line length limits with xargs. :-) Speaking of makefiles, I had a makefile full of find commands, and I'm sure the output of a bunch of them went to xargs. -- Robert Webb
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <d64c48d9-cb19-f93e-f8b6-40d826d7b3fc@Telcontar.valinor> El 2023-03-07 a las 23:04 +0100, Carlos E. R. escribió:
On Tuesday, 2023-03-07 at 12:39 -0800, Bob Rogers wrote:
On Tuesday, 2023-03-07 at 19:05 +0100, Per Jessen wrote:
Really?? You have kept doing upgrades since then? Well, then I think you are going to find something that enables those log messages.
Yes, that far back. I did a full reinstall from 5.2 to 6.1 or 6.3, then DVD upgrades since then all the way, with some hardware upgrades in between, including one from 32 to 64 bits.
Huh, dunno how to find the oldest dated file in the computer.
Your old friend find. This is the "oldest directory" version:
...
Ok, I know I can do it with scripts, but not with pipes.
And so I did. Thanks to those trying to help me doing it with pipes, but I gave up on that. This is the script, with temporary files: +++···························· Telcontar:~ # cat bin/SearchForOldestFile #!/bin/bash function delete_file_if_it_exists() { if [ -f $1 ]; then rm $1 fi } echo -n "Starting at: " date --rfc-3339=ns #locate -e --regex "^/bin" > ListOfFiles.tmp #Ok. #Fail: #locate -e --regex "^/srv ^/var ^/bin ^/sbin ^/tmp ^/boot ^/etc ^/lib ^/opt ^/root ^/usr" > ListOfFiles.tmp #locate -e --regex "^/srv -o ^/bin" #locate -e --regex "^/srv | ^/bin" #locate -e --regex "^/srv \| ^/bin" #Giving up. delete_file_if_it_exists ListOfFiles.tmp locate -e --regex "^/srv" >> ListOfFiles.tmp locate -e --regex "^/var" >> ListOfFiles.tmp locate -e --regex "^/bin" >> ListOfFiles.tmp locate -e --regex "^/sbin" >> ListOfFiles.tmp locate -e --regex "^/tmp" >> ListOfFiles.tmp locate -e --regex "^/boot" >> ListOfFiles.tmp locate -e --regex "^/etc" >> ListOfFiles.tmp locate -e --regex "^/lib" >> ListOfFiles.tmp locate -e --regex "^/opt" >> ListOfFiles.tmp locate -e --regex "^/root" >> ListOfFiles.tmp locate -e --regex "^/usr" >> ListOfFiles.tmp echo -n " " ; wc -l ListOfFiles.tmp echo -n "Locate done at: " date --rfc-3339=ns delete_file_if_it_exists ListOfFilesWithBirthDate.tmp while read FILES ; do stat --printf="%W birth: %w access: %x modif: %y %n\n" "$FILES" >> ListOfFilesWithBirthDate.tmp done < ListOfFiles.tmp echo -n " " ; wc -l ListOfFilesWithBirthDate.tmp echo -n "Stat (birth) done at: " date --rfc-3339=ns delete_file_if_it_exists ListOfFilesWithModifiedDate.tmp while read FILES ; do stat --printf="%X birth: %w access: %x modif: %y %n\n" "$FILES" >> ListOfFilesWithModifiedDate.tmp done < ListOfFiles.tmp echo -n " " ; wc -l ListOfFilesWithModifiedDate.tmp echo -n "Stat (modfd) done at: " date --rfc-3339=ns sort --general-numeric-sort ListOfFilesWithModifiedDate.tmp > ListOfFilesSortedByModifiedDate.tmp echo -n " " ; wc -l ListOfFilesSortedByModifiedDate.tmp echo -n "Sorted (modfd) done at: " date --rfc-3339=ns sort --general-numeric-sort ListOfFilesWithBirthDate.tmp > ListOfFilesSortedByBirthDate.tmp echo -n " " ; wc -l ListOfFilesSortedByBirthDate.tmp echo -n "Sorted (birth) done at: " date --rfc-3339=ns Telcontar:~ # ····························++- This is the run: +++···························· Telcontar:~ # time SearchForOldestFile Starting at: 2023-03-08 14:20:06.833592361+01:00 1731458 ListOfFiles.tmp Locate done at: 2023-03-08 14:20:16.846290832+01:00 stat: cannot statx '/usr/lib/systemd/system/system-systemdx2dcryptsetup.slice': No such file or directory stat: cannot statx '': No such file or directory stat: cannot statx '/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/tes': No such file or directory stat: cannot statx 't': No such file or directory stat: cannot statx '/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/test/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/tesu.test': Not a directory stat: cannot statx '/usr/local/compilaciones/gEDA/20070216': No such file or directory 1731451 ListOfFilesWithBirthDate.tmp Stat (birth) done at: 2023-03-08 14:40:31.138430146+01:00 stat: cannot statx '/usr/lib/systemd/system/system-systemdx2dcryptsetup.slice': No such file or directory stat: cannot statx '': No such file or directory stat: cannot statx '/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/tes': No such file or directory stat: cannot statx 't': No such file or directory stat: cannot statx '/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/test/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/tesu.test': Not a directory stat: cannot statx '/usr/local/compilaciones/gEDA/20070216': No such file or directory 1731451 ListOfFilesWithModifiedDate.tmp Stat (modfd) done at: 2023-03-08 14:59:58.107110232+01:00 1731451 ListOfFilesSortedByModifiedDate.tmp Sorted (modfd) done at: 2023-03-08 14:59:59.507285148+01:00 1731451 ListOfFilesSortedByBirthDate.tmp Sorted (birth) done at: 2023-03-08 15:00:00.826140630+01:00 real 39m53.995s user 31m27.861s sys 10m23.642s Telcontar:~ # ····························++- I found some strange "entities" with the stats. For instance: stat: cannot statx '/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/test/usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl/tesu.test': Not a directory Indeed. Look at the culprit: cer@Telcontar:~> l /usr/local/compilaciones/FSlint-2.08/fslint/tstlnt/findnl total 16 - -rw-r--r-- 1 cer users 0 Jul 2 2006 ? - -rw-r--r-- 1 cer users 0 Jul 2 2006 test - -rw-r--r-- 1 cer users 0 Jul 2 2006 ! - -rw-r--r-- 1 cer users 0 Jul 2 2006 "test" - -rw-r--r-- 1 cer users 0 Jul 2 2006 $test - -rw-r--r-- 1 cer users 0 Jul 2 2006 (test) - -rw-r--r-- 1 cer users 0 Jul 2 2006 ,}test - -rw-r--r-- 1 cer users 0 Jul 2 2006 ,}test3 - -rw-r--r-- 1 cer users 0 Jul 2 2006 -test drwxr-xr-x 4 cer users 4096 Oct 18 2006 ./ drwxr-xr-x 10 cer users 4096 Jul 2 2006 ../ drwxr-xr-x 2 cer users 4096 Jul 2 2006 .../ <======== - -rw-r--r-- 1 cer users 0 Dec 8 2000 0test - -rw-r--r-- 1 cer users 0 Dec 8 2000 12.{test - -rw-r--r-- 1 cer users 0 Dec 8 2000 1test - -rw-r--r-- 1 cer users 0 Jul 2 2006 ::test - -rw-r--r-- 1 cer users 0 Jul 2 2006 :test - -rw-r--r-- 1 cer users 0 Jul 2 2006 @test - -rw-r--r-- 1 cer users 0 Feb 4 2001 PosixLengthTest - -rw-r--r-- 1 cer users 0 Dec 8 2000 Test - -rw-r--r-- 1 cer users 0 Jul 2 2006 [.test - -rw-r--r-- 1 cer users 0 Jul 2 2006 [.test].test - -rw-r--r-- 1 cer users 0 Jul 2 2006 [test-5].test - -rw-r--r-- 1 cer users 0 Dec 8 2000 file@test - -rw-r--r-- 1 cer users 0 Jul 2 2006 te -st - -rw-r--r-- 1 cer users 0 Jul 2 2006 te*st - -rw-r--r-- 1 cer users 0 Jul 2 2006 te-st - -rw-r--r-- 1 cer users 0 Jul 2 2006 te?st - -rw-r--r-- 1 cer users 0 Jul 2 2006 te\*st - -rw-r--r-- 1 cer users 0 Jul 2 2006 te\st - -rw-r--r-- 1 cer users 0 Jul 2 2006 tes?t - -rw-r--r-- 1 cer users 0 Jul 2 2006 tes t - -rw-r--r-- 1 cer users 0 Dec 8 2000 tes;t - -rw-r--r-- 1 cer users 0 Dec 8 2000 tes<>t - -rw-r--r-- 1 cer users 0 Dec 8 2000 test - -rw-r--r-- 1 cer users 0 Jul 2 2006 test - -rw-r--r-- 1 cer users 0 Jul 2 2006 test - -rw-r--r-- 1 cer users 0 Dec 8 2000 test! - -rw-r--r-- 1 cer users 0 Dec 8 2000 test's - -rw-r--r-- 1 cer users 0 Jan 28 2001 test. - -rw-r--r-- 1 cer users 0 Dec 12 2000 test.. - -rw-r--r-- 1 cer users 0 Dec 8 2000 test.test - -rw-r--r-- 1 cer users 0 Jul 2 2006 test: - -rw-r--r-- 1 cer users 0 Dec 8 2000 test:: - -rw-r--r-- 1 cer users 0 Dec 8 2000 test::test - -rw-r--r-- 1 cer users 0 Dec 8 2000 test:test - -rw-r--r-- 1 cer users 0 Dec 8 2000 test=test - -rw-r--r-- 1 cer users 0 Jul 2 2006 test\ - -rw-r--r-- 1 cer users 0 Dec 8 2000 tesu.test - -rw-r--r-- 1 cer users 0 Dec 8 2000 tes|t - -rw-r--r-- 1 cer users 0 Jul 2 2006 t?st - -rw-r--r-- 1 cer users 0 Jul 2 2006 {,test - -rw-r--r-- 1 cer users 0 Jul 2 2006 {1,2}.test - -rw-r--r-- 1 cer users 0 Jul 2 2006 {12}.test drwxr-xr-x 2 cer users 4096 Jul 2 2006 ~baddirname/ - -rw-r--r-- 1 cer users 0 Jul 2 2006 ~test cer@Telcontar:~> I wonder if /I/ did that, or came intentionally with that program. Or this directory: ls l /usr/local/compilaciones/gEDA/20070216\ / Yes, with a space at the end. So, the oldests files by "birth date" are: Telcontar:~ # head ListOfFilesSortedByBirthDate.tmp 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /boot/efi 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /root/.cache/doc 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /root/.cache/doc/by-app 0 birth: - access: 2017-07-07 00:56:23.200727601 +0200 modif: 2003-11-25 01:46:42.000000000 +0100 /opt/BACKUP/netscape7.1/.autoreg 0 birth: - access: 2017-07-07 00:57:52.049164951 +0200 modif: 2005-04-22 00:27:29.000000000 +0200 /opt/exp/not_mounted 0 birth: - access: 2017-07-07 00:58:05.696617687 +0200 modif: 2006-07-02 13:49:52.000000000 +0200 /opt/kde3/share/config/.kthemestylerc.lock 0 birth: - access: 2017-07-07 00:58:09.660458736 +0200 modif: 2005-08-23 02:44:39.000000000 +0200 /opt/kde3/share/fonts/override/fonts.cache-1 0 birth: - access: 2017-07-07 00:58:09.660458736 +0200 modif: 2014-02-26 09:39:36.000000000 +0100 /opt/kde3/share/fonts/.fonts-config-timestamp 0 birth: - access: 2017-07-07 00:58:15.540222919 +0200 modif: 2008-02-14 13:45:31.000000000 +0100 /opt/vex/configuration/org.eclipse.core.runtime/.manager/.fileTableLock 0 birth: - access: 2017-07-07 00:58:15.568221796 +0200 modif: 2008-02-14 13:45:32.000000000 +0100 /opt/vex/configuration/org.eclipse.update/.lock Telcontar:~ # 2017-07-07 is the date of one of the disk clone operations, likely (hardware migrations). Instead, looking at the file modification date, I get: Telcontar:~ # head ListOfFilesSortedByModifiedDate.tmp 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /boot/efi 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /root/.cache/doc 0 birth: - access: 1970-01-01 01:00:00.000000000 +0100 modif: 1970-01-01 01:00:00.000000000 +0100 /root/.cache/doc/by-app 1137109450 birth: 2022-11-29 21:53:12.615995072 +0100 access: 2006-01-13 00:44:10.000000000 +0100 modif: 2006-01-13 00:44:10.000000000 +0100 /etc/texmf/tex/amstex/base/amsppt.sti 1137109582 birth: 2022-11-29 21:49:16.359995284 +0100 access: 2006-01-13 00:46:22.000000000 +0100 modif: 2006-01-13 00:46:22.000000000 +0100 /etc/texmf/tex/lambda/config/language.dat 1137109606 birth: 2022-11-29 22:03:34.467994514 +0100 access: 2006-01-13 00:46:46.000000000 +0100 modif: 2006-01-13 00:46:46.000000000 +0100 /etc/texmf/tex/plain/cyrplain/cyrtex.cfg 1460756036 birth: 2022-11-29 21:49:48.319995256 +0100 access: 2016-04-15 23:33:56.000000000 +0200 modif: 2016-04-15 23:33:56.000000000 +0200 /etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex 1499381783 birth: - access: 2017-07-07 00:56:23.200727601 +0200 modif: 2003-11-25 01:46:42.000000000 +0100 /opt/BACKUP/netscape7.1/.autoreg 1499381872 birth: - access: 2017-07-07 00:57:52.049164951 +0200 modif: 2005-04-22 00:27:29.000000000 +0200 /opt/exp/not_mounted 1499381885 birth: - access: 2017-07-07 00:58:05.696617687 +0200 modif: 2006-07-02 13:49:52.000000000 +0200 /opt/kde3/share/config/.kthemestylerc.lock Telcontar:~ # So, oldest file is: 2006-01-13 00:44:10.000000000 +0100 /etc/texmf/tex/amstex/base/amsppt.sti It comes from an rpm, apparently: cer@Telcontar:~> rpm -qf /etc/texmf/tex/amstex/base/amsppt.sti texlive-amstex-2021.189.svn57972-150400.18.1.noarch cer@Telcontar:~> So maybe that file doesn't count. There is an old mountpoint not currently in use: 2005-04-22 00:27:29.000000000 +0200 /opt/exp/not_mounted And: 2003-11-25 01:46:42.000000000 +0100 /opt/BACKUP/netscape7.1/.autoreg There is an old file in /bin: Telcontar:~ # ls -ltr /bin | head total 812 -rwxr-xr-x 1 root root 119 Oct 7 2005 myrpm -rwxr-xr-x 1 root root 957 Nov 27 2008 upssched-cmd~ lrwxrwxrwx 1 root root 23 Jan 31 2010 newaliases -> ../../usr/sbin/sendmail or some config files in etc: Telcontar:~ # ls -ltr /etc | head total 5820 -rw-r--r-- 1 root root 373 Apr 26 2003 rearj.cfg -rw------- 1 fetchmail root 80 Oct 7 2005 fetchmailrc -rw-r--r-- 1 root root 2380 Oct 7 2005 yiffrc -rw-r----- 1 root root 4147 Oct 7 2005 wvdial.conf~backup -r-------- 1 root root 1154 Oct 7 2005 su1.priv.original -rw------- 1 root root 906 Oct 7 2005 procmailrc.desactivado -rw-r--r-- 1 root root 25 Oct 7 2005 vsftpd.user_list -r-------- 1 root root 1154 Oct 7 2005 su1.priv -rw-r--r-- 1 root root 906 Oct 7 2005 procmailrc~ Telcontar:~ # Searching for the oldest files under the /etc tree, I find: Telcontar:~ # head ListOfFilesSortedByModifiedDate.tmp 137109450 birth: 2022-11-29 21:53:12.615995072 +0100 access: 2006-01-13 00:44:10.000000000 +0100 modif: 2006-01-13 00:44:10.000000000 +0100 /etc/texmf/tex/amstex/base/amsppt.sti 1137109582 birth: 2022-11-29 21:49:16.359995284 +0100 access: 2006-01-13 00:46:22.000000000 +0100 modif: 2006-01-13 00:46:22.000000000 +0100 /etc/texmf/tex/lambda/config/language.dat 1137109606 birth: 2022-11-29 22:03:34.467994514 +0100 access: 2006-01-13 00:46:46.000000000 +0100 modif: 2006-01-13 00:46:46.000000000 +0100 /etc/texmf/tex/plain/cyrplain/cyrtex.cfg 1460756036 birth: 2022-11-29 21:49:48.319995256 +0100 access: 2016-04-15 23:33:56.000000000 +0200 modif: 2016-04-15 23:33:56.000000000 +0200 /etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex 1506215379 birth: 2017-09-24 03:09:39.255204748 +0200 access: 2017-09-24 03:09:39.255204748 +0200 modif: 2005-10-07 02:49:05.000000000 +0200 /etc_13.1/.pwd.lock 1506215379 birth: 2017-09-24 03:09:39.275203975 +0200 access: 2017-09-24 03:09:39.275203975 +0200 modif: 2012-08-12 01:23:38.000000000 +0200 /etc_13.1/mtab.fuselock 1506215379 birth: 2017-09-24 03:09:39.275203975 +0200 access: 2017-09-24 03:09:39.275203975 +0200 modif: 2013-09-27 22:18:33.000000000 +0200 /etc_13.1/opiekeys 1506215379 birth: 2017-09-24 03:09:39.367200425 +0200 access: 2017-09-24 03:09:39.367200425 +0200 modif: 2010-12-28 14:09:55.000000000 +0100 /etc_13.1/X11/.qtrc.lock 1506215379 birth: 2017-09-24 03:09:39.367200425 +0200 access: 2017-09-24 03:09:39.367200425 +0200 modif: 2010-12-28 14:09:57.000000000 +0100 /etc_13.1/X11/.qt_plugins_3.3rc.lock 1506215379 birth: 2017-09-24 03:09:39.367200425 +0200 access: 2017-09-24 03:09:39.367200425 +0200 modif: 2010-12-28 14:09:58.000000000 +0100 /etc_13.1/X11/.kstylerc.lock There are strange things in this sort. File "pdftexconfig.tex" is out of order, the number of seconds since the epoch can't be right. Anyway, some config files for tex are very old. But they could be that old inside the rpm. Refining the search to /etc/, I get: Telcontar:~ # head ListOfFilesSortedByModifiedDate.tmp 1137109450 birth: 2022-11-29 21:53:12.615995072 +0100 access: 2006-01-13 00:44:10.000000000 +0100 modif: 2006-01-13 00:44:10.000000000 +0100 /etc/texmf/tex/amstex/base/amsppt.sti 1137109582 birth: 2022-11-29 21:49:16.359995284 +0100 access: 2006-01-13 00:46:22.000000000 +0100 modif: 2006-01-13 00:46:22.000000000 +0100 /etc/texmf/tex/lambda/config/language.dat 1137109606 birth: 2022-11-29 22:03:34.467994514 +0100 access: 2006-01-13 00:46:46.000000000 +0100 modif: 2006-01-13 00:46:46.000000000 +0100 /etc/texmf/tex/plain/cyrplain/cyrtex.cfg 1460756036 birth: 2022-11-29 21:49:48.319995256 +0100 access: 2016-04-15 23:33:56.000000000 +0200 modif: 2016-04-15 23:33:56.000000000 +0200 /etc/texmf/tex/generic/tex-ini-files/pdftexconfig.tex 1611132613 birth: 2022-11-29 21:56:18.727994905 +0100 access: 2021-01-20 09:50:13.000000000 +0100 modif: 2021-01-20 09:50:13.000000000 +0100 /etc/texmf/latexmk/latexmk.conf 1651999779 birth: 2022-11-29 21:35:30.039996026 +0100 access: 2022-05-08 10:49:39.000000000 +0200 modif: 2022-05-08 10:49:39.000000000 +0200 /etc/chrony.keys 1669469559 birth: 2017-09-24 03:09:32.783454271 +0200 access: 2022-11-26 14:32:39.645493797 +0100 modif: 2017-01-27 04:00:51.509216683 +0100 /etc/.pwd.lock 1669469559 birth: 2017-09-24 03:09:32.787454116 +0200 access: 2022-11-26 14:32:39.649493787 +0100 modif: 2016-12-26 14:47:24.571991344 +0100 /etc/brlapi.key 1669469559 birth: 2017-09-24 03:09:32.791453962 +0200 access: 2022-11-26 14:32:39.649493787 +0100 modif: 2005-10-07 02:49:00.000000000 +0200 /etc/crontab.old 1669469559 birth: 2017-09-24 03:09:32.791453962 +0200 access: 2022-11-26 14:32:39.649493787 +0100 modif: 2012-08-12 17:27:29.000000000 +0200 /etc/defkeymap.map Telcontar:~ # /etc/crontab.old seems the oldest proper file in /etc, or "myrpm" in /bin. /Both dated 2005-10-07, thus probably some backup/restore or clone /operation. I have a log of upgrades, but I started that on 2009. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZAjL3Bwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVF7YAniDYOc8LDnxvJgSm5pKd rIrkfq06AJ9GYbYCwbIuWDp0shYXFl5PXIJd0w== =Yoju -----END PGP SIGNATURE-----
Carlos, et al -- ...and then Carlos E. R. said... % % El 2023-03-07 a las 23:04 +0100, Carlos E. R. escribió: % ... % % > Ok, I know I can do it with scripts, but not with pipes. % % And so I did. % % Thanks to those trying to help me doing it with pipes, but I gave up on % that. [snip] Just to close this loop ... I really don't see how standard *NIX commands are too hard here. To wit: davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdt 2>/dev/null | tail -rw-r--r-- 1 3.8K Oct 19 2020 /srv/www/htdocs/phpMyAdmin/view_operations.php drwxr-xr-x 2 6 Jun 8 2020 /srv/ftp drwxr-xr-x 2 6 May 31 2020 /srv/www/perl-lib -rw-r--r-- 1 6 Oct 9 2019 /tmp/bootinfoscript-master/.gitignore -rw-r--r-- 1 11K Oct 9 2019 /tmp/bootinfoscript-master/CHANGELOG -rw-r--r-- 1 3.5K Oct 9 2019 /tmp/bootinfoscript-master/README -rwxr-xr-x 1 136K Oct 9 2019 /tmp/bootinfoscript-master/bootinfoscript -rw-r--r-- 1 275 Aug 2 2019 /tmp/bash.bashrc.local -rw-r--r-- 1 50K Jul 17 2018 /tmp/putty-settings.reg -rw-r--r-- 1 0 Jan 1 1970 /tmp/very.old.file davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdtr 2>/dev/null | tail -rw------- 1 48K Mar 5 05:19 /tmp/N195PB.json -rw-r--r-- 1 316 Mar 8 15:15 /tmp/OS-rsync-mirror.sh..err -rw------- 1 3.5M Mar 8 19:18 /tmp/mutt-jpo-5001-25616-1446762972085782199 -rw------- 1 8.9K Mar 8 19:18 /tmp/mutt-jpo-5001-25616-379512223110164874 -rw------- 1 5.4K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-3269396191541694846 -rw------- 1 4.5K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-2027603230207742985 -rw------- 1 24K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-1160064702822402193 -rw-r--r-- 1 0 Mar 8 19:21 /tmp/very.new.file -rw-r--r-- 1 464 Mar 8 19:25 /tmp/hb.out-err -rw------- 1 7.4K Mar 8 19:28 /tmp/mutt-jpo-5001-25616-703867469273079447 Notice the 'd' in -gohdt (oldest last) and -gohdtr (newest last) to not descend into directories. That's all you had broken before ... HTH & QTBD :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <1c1a9282-2caf-5232-dc4b-7574764348bd@Telcontar.valinor> El 2023-03-08 a las 19:33 -0000, David Thorburn-Gundlach escribió:
Carlos, et al --
...and then Carlos E. R. said... % % El 2023-03-07 a las 23:04 +0100, Carlos E. R. escribió: % ... % % > Ok, I know I can do it with scripts, but not with pipes. % % And so I did. % % Thanks to those trying to help me doing it with pipes, but I gave up on % that. [snip]
Just to close this loop ... I really don't see how standard *NIX commands are too hard here. To wit:
davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdt 2>/dev/null | tail -rw-r--r-- 1 3.8K Oct 19 2020 /srv/www/htdocs/phpMyAdmin/view_operations.php drwxr-xr-x 2 6 Jun 8 2020 /srv/ftp drwxr-xr-x 2 6 May 31 2020 /srv/www/perl-lib -rw-r--r-- 1 6 Oct 9 2019 /tmp/bootinfoscript-master/.gitignore -rw-r--r-- 1 11K Oct 9 2019 /tmp/bootinfoscript-master/CHANGELOG -rw-r--r-- 1 3.5K Oct 9 2019 /tmp/bootinfoscript-master/README -rwxr-xr-x 1 136K Oct 9 2019 /tmp/bootinfoscript-master/bootinfoscript -rw-r--r-- 1 275 Aug 2 2019 /tmp/bash.bashrc.local -rw-r--r-- 1 50K Jul 17 2018 /tmp/putty-settings.reg -rw-r--r-- 1 0 Jan 1 1970 /tmp/very.old.file
Starting the run. Telcontar:~ # date --rfc-3339=ns ; echo ; find / -print0 2>/dev/null | xargs -0 ls -gohdt 2>/dev/null | tail ; echo ; date --rfc-3339=ns 2023-03-08 21:10:38.720311490+01:00 drwxr-xr-x 2 4.0K Jun 19 2005 /windows/F - -rw-r--r-- 1 0 Jun 19 2005 /windows/C/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/D/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/E/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/F/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/G/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/H/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/I/not_mounted - -rw-r--r-- 1 0 Jun 19 2005 /windows/OldA/not_mounted - --w-r--r-- 1 0 Jun 19 2005 /windows/OldD/not_mounted 2023-03-08 21:28:01.511213371+01:00 Telcontar:~ # Yeah, those files come from when the machine was double boot. I upgraded the machine, everything was cloned. Did not see: 1970-01-01 01:00:00.000000000 +0100 /boot/efi 1970-01-01 01:00:00.000000000 +0100 /root/.cache/doc 2003-11-25 01:46:42.000000000 +0100 /opt/BACKUP/netscape7.1/.autoreg 2005-04-22 00:27:29.000000000 +0200 /opt/exp/not_mounted :-? And finished too fast, I think.
davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdtr 2>/dev/null | tail -rw------- 1 48K Mar 5 05:19 /tmp/N195PB.json -rw-r--r-- 1 316 Mar 8 15:15 /tmp/OS-rsync-mirror.sh..err -rw------- 1 3.5M Mar 8 19:18 /tmp/mutt-jpo-5001-25616-1446762972085782199 -rw------- 1 8.9K Mar 8 19:18 /tmp/mutt-jpo-5001-25616-379512223110164874 -rw------- 1 5.4K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-3269396191541694846 -rw------- 1 4.5K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-2027603230207742985 -rw------- 1 24K Mar 8 19:19 /tmp/mutt-jpo-5001-25616-1160064702822402193 -rw-r--r-- 1 0 Mar 8 19:21 /tmp/very.new.file -rw-r--r-- 1 464 Mar 8 19:25 /tmp/hb.out-err -rw------- 1 7.4K Mar 8 19:28 /tmp/mutt-jpo-5001-25616-703867469273079447
Notice the 'd' in -gohdt (oldest last) and -gohdtr (newest last) to not descend into directories. That's all you had broken before ...
Ok :-) - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZAjyohwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVyJAAn0rdPIr8BfFkeY0z7afc G3o8wMwHAJ9DbZCo/9xd2ii1SHGNYuOj1tEGxg== =+qDd -----END PGP SIGNATURE-----
On Wed, 8 Mar 2023 19:33:20 +0000, David Thorburn-Gundlach <davidtg-robot@justpickone.org> wrote:
Just to close this loop ... I really don't see how standard *NIX commands are too hard here. To wit:
davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdt 2>/dev/null | tail -rw-r--r-- 1 3.8K Oct 19 2020 /srv/www/htdocs/phpMyAdmin/view_operations.php drwxr-xr-x 2 6 Jun 8 2020 /srv/ftp drwxr-xr-x 2 6 May 31 2020 /srv/www/perl-lib -rw-r--r-- 1 6 Oct 9 2019 /tmp/bootinfoscript-master/.gitignore -rw-r--r-- 1 11K Oct 9 2019 /tmp/bootinfoscript-master/CHANGELOG -rw-r--r-- 1 3.5K Oct 9 2019 /tmp/bootinfoscript-master/README -rwxr-xr-x 1 136K Oct 9 2019 /tmp/bootinfoscript-master/bootinfoscript -rw-r--r-- 1 275 Aug 2 2019 /tmp/bash.bashrc.local -rw-r--r-- 1 50K Jul 17 2018 /tmp/putty-settings.reg -rw-r--r-- 1 0 Jan 1 1970 /tmp/very.old.file
If that worked, then you have a relatively small number of files/directories on your system. Do you get the same set with this? (the same, except in reverse order) sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdtr 2>/dev/null \ | head How many?: sudo find / -printf 'X\n' 2>/dev/null | wc -l -- Robert Webb
Robert, et al -- ...and then Robert Webb said... % On Wed, 8 Mar 2023 19:33:20 +0000, David Thorburn-Gundlach <davidtg-robot@justpickone.org> wrote: % > Just to close this loop ... I really don't see how standard *NIX % > commands are too hard here. To wit: % > % > davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdt 2>/dev/null | tail ... % > -rw-r--r-- 1 0 Jan 1 1970 /tmp/very.old.file % % If that worked, then you have a relatively small number of % files/directories on your system. Do you get the same set with % this? (the same, except in reverse order) % % sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdtr 2>/dev/null \ % | head Well, color me corrected! I forgot about xargs batching; thanks. davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdt 2>/dev/null | tail -rw-r--r-- 1 3.8K Oct 19 2020 /srv/www/htdocs/phpMyAdmin/view_operations.php ... -rw-r--r-- 1 0 Jan 1 1970 /tmp/very.old.file davidtg@jpo:~> sudo find / -print0 2>/dev/null | sudo xargs -0 ls -gohdtr 2>/dev/null | head drwxr-xr-x 2 16K Jan 1 1970 /mnt/slices/Seag4000-ZDHBKZTG-fat ... -rw-r--r-- 1 6 Jan 3 1994 /mnt/4TRaid10md/home/davidtg/mutt-recovery/00-lake-orig/davidtg/.project Yes, different results. % % How many?: % % sudo find / -printf 'X\n' 2>/dev/null | wc -l davidtg@jpo:~> time sudo find / 2>/dev/null | wc -l 3151828 real 0m5.649s user 0m2.031s sys 0m2.362s More than I want to count by hand, but not as many as on diskfarm :-) diskfarm:~ # wc -l /mnt/ssd/cleanup/find-print 8367418 /mnt/ssd/cleanup/find-print Hmmmmm ... That seems surprisingly low. Do I really have only just more than twice as many files on the main server as I have on the little interactive server? Oh, wait. It was all of that /proc (and similar) stuff, I bet. Let's see ... davidtg@jpo:~> sudo wc -l /mnt/ssd/cleanup/find-print 2838122 /mnt/ssd/cleanup/find-print Ahhh. That makes more sense :-) Still a surprising percentage of the big guy, though. OS, maybe? diskfarm:~ # find / /usr -xdev -type f | wc -l 379013 davidtg@jpo:~> sudo find / /usr -xdev | wc -l 541296 Well, that's weird, since the two should be built pretty much the same, with some GUI support but not crazy stuff. But my desktop looks similar davidtg@gezebel:~> sudo find / /usr -xdev | wc -l 553437 and that's where I *do* have lots of GUI, tools, toys, etcetc. For fun, it's diskfarm that was recently rebuilt, while jpo and gezebel are unchanged from their original installs (and jpo showed up just after diskfarm despite not having had the OS mirroring fun). diskfarm:~ # cat /etc/SUSE-brand openSUSE VERSION = 15.2 davidtg@jpo:~> cat /etc/SUSE-brand openSUSE VERSION = 15.2 davidtg@gezebel:~> cat /etc/SUSE-brand openSUSE VERSION = 15.1 We don't even get to say "15.1 was bulkier than 15.2" for an easy answer. I smell an evening of analysis coming when I can find some free time :-) % % -- % Robert Webb Thanks & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
On 07.03.2023 16:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
Both my running this minute machines have "1".
Telcontar:~ # l /etc/sysctl*
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian
As Andrei suggests, it might be worth also checking the other locations for sysctl conf files.
On a TW system, I see martians being explicitly disabled: /etc/sysctl.d/martians.conf
This file does not exist here.
Same on a 15.4 system.
If "same" means file "/etc/sysctl.d/martians.conf", this file does not exist here as well.
That suggests logging of martians was enabled by default at some point.
This rather suggests that you have (or had) some tool that changes (changed) this setting. Anyway, the default is being disabled, so there is some program that changes it during runtime. It is not firewalld (neither from source inspection nor from testing) but SuSEfirewall2 *does* have code to explicitly enable log_martians in some cases. So one could either configure audit to log all accesses to log_martian files or try to start services one by one from basic.target and see when it flips.
Nothing on 15.3 or 15.1.
Andrei Borzenkov wrote:
Anyway, the default is being disabled, so there is some program that changes it during runtime.
+1
It is not firewalld (neither from source inspection nor from testing) but SuSEfirewall2 *does* have code to explicitly enable log_martians in some cases.
Okay, maybe that is something for Carlos to look into, if he using SuSEfirewall2. -- Per Jessen, Zürich (5.4°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Andrei Borzenkov wrote:
On 07.03.2023 16:18, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-07 10:43, Per Jessen wrote:
Fwiw, none of my machines (my own, openSUSE etc) have martians set to 1. Maybe check /etc/sysctl*.
Both my running this minute machines have "1".
Telcontar:~ # l /etc/sysctl*
"maybe check" means: find /etc/sysctl* -type f | xargs grep martian
As Andrei suggests, it might be worth also checking the other locations for sysctl conf files.
On a TW system, I see martians being explicitly disabled: /etc/sysctl.d/martians.conf
This file does not exist here.
Same on a 15.4 system.
If "same" means file "/etc/sysctl.d/martians.conf", this file does not exist here as well.
Yeah, I realised later that those config files were probably left on a template system and never removed. The two TW and 15.4 systems above are openSUSE servers, I don't have any "/etc/sysctl.d/martians.conf" on my own systems. -- Per Jessen, Zürich (5.3°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-08 06:37, Andrei Borzenkov wrote:
Anyway, the default is being disabled, so there is some program that changes it during runtime. It is not firewalld (neither from source inspection nor from testing) but SuSEfirewall2 *does* have code to explicitly enable log_martians in some cases. So one could either configure audit to log all accesses to log_martian files or try to start services one by one from basic.target and see when it flips.
Ah, yes, I remember that. It is quite possible that I saw the setting and altered to activate, long ago. ## Type: yesno # # Do you want to enable additional kernel TCP/IP security features? # If set to yes, some obscure kernel options are set. # (log_martians, rp_filter, routing flush, accept_source_route) # # If you have configured one of these settings in /etc/sysctl.conf then # SuSEfirewall2 won't apply any different value to allow you to override some # of these settings to your liking. Also see FW_SYSCTL_DIRS. # # Tip: Set this to "no" until you have verified that you have got a # configuration which works for you. Then set this to "yes" and keep it # if everything still works. (It should!) ;-) # # Choice: "yes" or "no", if not set defaults to "yes" # FW_KERNEL_SECURITY="" Ok, then I did not change it, but the default is active. That's why I have it active, both machines I checked have SuSEfirewall2 running. I have one laptop with firewalld, I'll look in there later. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
participants (8)
-
Andrei Borzenkov
-
Bernhard Voelker
-
Bob Rogers
-
Carlos E. R.
-
Carlos E.R.
-
David Thorburn-Gundlach
-
Per Jessen
-
Robert Webb