Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #71641

Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without

From "Carlos E.R." <robin_listas@es.invalid>
Newsgroups comp.os.linux.misc
Subject Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without
Date 2025-08-19 12:28 +0200
Message-ID <180enlxc26.ln2@Telcontar.valinor> (permalink)
References <107gp14$3ko4l$1@dont-email.me> <sm0cy8ygm1d.fsf@lakka.kapsi.fi> <107louk$p5vg$4@dont-email.me> <slrn109vjas.e09o.candycanearter07@candydeb.host.invalid>

Show all headers | View raw


On 2025-08-16 02:20, candycanearter07 wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> wrote at 22:45 this Thursday (GMT):
>> On Thu, 14 Aug 2025 14:50:06 +0300, Anssi Saari wrote:
>>
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>>> What’s an obvious omission from his list? To me, it’s the “find”
>>>> command.
>>>
>>> Possibly or something like it. I just started looking into rawhide which
>>> is another search tool. My interest is rawhide's ability to search for
>>> tags in extended attributes. I've started adding tags to videos and
>>> photos so I can search for those with rawhide.
>>
>> The “find” command has the ability to execute external commands. Those can
>> produce output on their own, and/or their success/failure exit status can
>> be used as a filter on matching files.
> 
> 
> To be fair, "find" can be a bit of a rabbithole to learn. I personally
> only know the basics of -name, -iname, and -type.

I have forgotten how to use find, I use it so few times. So instead of 
learning again, when I need to use it, I use chatgpt to concoct the line 
for me :-P

The other day I wanted to search a machine to find files created between 
certain dates:

Laicolasse:~ # time find / -type d -newermt "2025-07-28" \
   ! -newermt "2025-07-31" 2>/dev/null | tee busqueda
^C

real	26m14.066s
user	0m3.725s
sys	1m5.634s
Laicolasse:~ #

Took way too long for a laptop with M2 disk. It was faster on other 
machines.

Turned out that an automount was happening of an external nfs mount on 
"/mnt/nfs/Isengard/xfsRaid/", and that raid is big and slow, the search 
took for ever.

I did not want to do a refresher course on "find" again.

With the aid of chatgpt I came with:

# find / \( -path /mnt/nfs/Isengard/xfsRaid/ \) -prune \
      -o -type d -newermt "2025-07-28" ! -newermt "2025-07-31" \
       2>/dev/null | tee busqueda

But did not work, the directory was mounted again and scanned. I then 
deleted the automount line from fstab:

#Isengard.valinor:/data/xfsRaid/   /mnt/nfs/Isengard/xfsRaid  \
     nfs4    noauto,nofail,x-systemd.automount,\
     x-systemd.idle-timeout=300,_netdev,user,users,lazytime 0 0


But did not work because systemd has a memory (automatic mount units) 
and still automounted the directory.

So what did I do?

Stop the network!

Brute force approach.


In retrospect, I should have used:

Laicolasse:~ # time find / \( -path /mnt/nfs/Isengard/ \) \
    -prune -o -type d -newermt "2025-07-28" ! -newermt \
    "2025-07-31" 2>/dev/null | tee busqueda
...

real	0m3.035s
user	0m0.836s
sys	0m2.180s
Laicolasse:~ #




-- 
Cheers, Carlos.

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-13 01:16 +0000
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-13 02:40 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-08-13 08:57 -0400
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Jason H <jason_hindle@yahoo.com> - 2025-08-14 21:05 +0000
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-15 08:37 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without John Ames <commodorejohn@gmail.com> - 2025-08-15 08:13 -0700
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-15 18:26 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-15 22:37 +0000
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-16 00:43 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-16 02:10 +0000
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-08-13 08:53 -0400
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Nuno Silva <nunojsilva@invalid.invalid> - 2025-08-14 00:45 +0100
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-14 01:09 +0000
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-08-13 11:01 -0400
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E. R." <robin_listas@es.invalid> - 2025-08-13 17:16 +0200
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-16 08:27 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-16 08:32 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without The Natural Philosopher <tnp@invalid.invalid> - 2025-08-13 17:31 +0100
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-13 21:30 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Allodoxaphobia <trepidation@example.net> - 2025-08-13 19:48 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-13 20:10 +0000
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-13 19:34 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-13 21:31 +0000
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E. R." <robin_listas@es.invalid> - 2025-08-13 23:40 +0200
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-13 23:42 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-14 01:08 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E. R." <robin_listas@es.invalid> - 2025-08-14 10:51 +0200
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-14 08:53 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-14 01:30 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-14 01:05 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Rene Kita <mail@rkta.de> - 2025-08-15 04:55 +0000
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-15 05:38 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Rene Kita <mail@rkta.de> - 2025-08-20 05:54 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-16 08:33 +0000
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Rich <rich@example.invalid> - 2025-08-16 18:28 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-16 19:05 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without The Natural Philosopher <tnp@invalid.invalid> - 2025-08-16 21:08 +0100
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-16 20:38 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-17 00:38 +0000
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Nuno Silva <nunojsilva@invalid.invalid> - 2025-08-17 09:08 +0100
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-17 09:16 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-17 22:27 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Richard Kettlewell <invalid@invalid.invalid> - 2025-08-16 22:27 +0100
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-17 00:44 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Nuno Silva <nunojsilva@invalid.invalid> - 2025-08-17 09:02 +0100
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Richard Kettlewell <invalid@invalid.invalid> - 2025-08-18 08:31 +0100
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-18 08:21 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Nuno Silva <nunojsilva@invalid.invalid> - 2025-08-22 10:18 +0100
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-19 12:06 +0200
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-20 00:50 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-20 12:20 +0200
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-20 22:16 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-23 12:22 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-24 00:38 +0200
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Stéphane CARPENTIER <sc@fiat-linux.fr> - 2025-08-24 11:15 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-24 22:44 +0200
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-24 22:16 +0000
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2025-08-21 11:44 +0300
  Re: I?m A Linux Expert, And Here Are 6 Commands I Can?t Live Without John McCue <jmclnx@gmail.com.invalid> - 2025-08-13 21:05 +0000
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2025-08-14 14:50 +0300
    Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-08-14 22:45 +0000
      Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-08-16 00:20 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-16 02:07 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-08-19 13:40 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-16 09:47 +0000
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-08-16 17:04 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-17 00:45 +0000
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-17 07:20 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without rbowman <bowman@montana.com> - 2025-08-17 07:18 +0000
        Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-19 12:28 +0200
          Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-20 00:59 +0000
            Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-20 12:32 +0200
              Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-20 22:21 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-21 02:29 +0200
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-08-21 01:29 +0000
                Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without "Carlos E.R." <robin_listas@es.invalid> - 2025-08-21 12:46 +0200
  Re: I’m A Linux Expert, And Here Are 6 Commands I Can’t Live Without Jason H <jason_hindle@yahoo.com> - 2025-08-14 21:07 +0000

csiph-web