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


Groups > comp.os.linux.misc > #70879 > unrolled thread

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

Started byLawrence D'Oliveiro <ldo@nz.invalid>
First post2025-08-13 01:16 +0000
Last post2025-08-14 21:07 +0000
Articles 20 on this page of 77 — 20 participants

Back to article view | Back to comp.os.linux.misc


Contents

  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

Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →


#70943

Fromrbowman <bowman@montana.com>
Date2025-08-13 20:10 +0000
Message-ID<mg49p9F7703U11@mid.individual.net>
In reply to#70916
On Wed, 13 Aug 2025 11:01:25 -0400, jayjwa wrote:

> Strange list.
> 1. rm 2. mv 3. cp 4. ls 5. find 6. locate (because you're not running
> "find" on /, are you?)
> 
> Should the list continue,
> 7. pkill/pgrep 8. grep 9. apropos 10. ip

11. pushd  12. popd  13. xargs

[toc] | [prev] | [next] | [standalone]


#70934

FromCharlie Gibbs <cgibbs@kltpzyxm.invalid>
Date2025-08-13 19:34 +0000
Message-ID<TM5nQ.13662$Ti33.5629@fx13.iad>
In reply to#70879
On 2025-08-13, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

> <https://www.zdnet.com/article/im-a-linux-expert-and-here-are-6-commands-i-cant-live-without/>
>
> What’s an obvious omission from his list? To me, it’s the “find”
> command. I have millions of files on my main machine (quite literally,
> I would say), and it is the most convenient and powerful way of
> finding something I might have worked on years ago, and mostly
> forgotten about since then.
>
> (Which is a lot of things.)

zip
unzip
rsync
diff
cmp
cut
uniq

Favourite one-liner:
grep foo * | cut -d: -f1 | uniq

How about a list of favourite options to common commands?
Mine is "ls -ltr", which shows files in chronological order.
Often I'm looking for a file I worked on recently but can't
remember its exact name; it shows up near the end of an
ls -ltr list.

-- 
/~\  Charlie Gibbs                  |  Growth for the sake of
\ /  <cgibbs@kltpzyxm.invalid>      |  growth is the ideology
 X   I'm really at ac.dekanfrus     |  of the cancer cell.
/ \  if you read it the right way.  |    -- Edward Abbey

[toc] | [prev] | [next] | [standalone]


#70947

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2025-08-13 21:31 +0000
Message-ID<107j076$4861$5@dont-email.me>
In reply to#70934
On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:

> How about a list of favourite options to common commands?
> Mine is "ls -ltr", which shows files in chronological order.
> Often I'm looking for a file I worked on recently but can't
> remember its exact name; it shows up near the end of an
> ls -ltr list.

Or drop the “r” and have it show up near the top.

[toc] | [prev] | [next] | [standalone]


#70949

From"Carlos E. R." <robin_listas@es.invalid>
Date2025-08-13 23:40 +0200
Message-ID<mg4f24F6lrgU1@mid.individual.net>
In reply to#70947
On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
> 
>> How about a list of favourite options to common commands?
>> Mine is "ls -ltr", which shows files in chronological order.
>> Often I'm looking for a file I worked on recently but can't
>> remember its exact name; it shows up near the end of an
>> ls -ltr list.
> 
> Or drop the “r” and have it show up near the top.

The top is out of the screen and not visible.

-- 
Cheers,
        Carlos E.R.

[toc] | [prev] | [next] | [standalone]


#70957

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2025-08-13 23:42 +0000
Message-ID<107j7tr$652c$2@dont-email.me>
In reply to#70949
On Wed, 13 Aug 2025 23:40:20 +0200, Carlos E. R. wrote:

> On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
>>
>> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
>>
>>> How about a list of favourite options to common commands? Mine is
>>> "ls -ltr", which shows files in chronological order. Often I'm
>>> looking for a file I worked on recently but can't remember its
>>> exact name; it shows up near the end of an ls -ltr list.
>>
>> Or drop the “r” and have it show up near the top.
>
> The top is out of the screen and not visible.

*nix user 101: figure out at least 3 simple (i.e. routine)
command-line techniques for dealing with that.

[toc] | [prev] | [next] | [standalone]


#70972

Fromrbowman <bowman@montana.com>
Date2025-08-14 01:08 +0000
Message-ID<mg4r7fFailaU1@mid.individual.net>
In reply to#70957
On Wed, 13 Aug 2025 23:42:51 -0000 (UTC), Lawrence D'Oliveiro wrote:

> On Wed, 13 Aug 2025 23:40:20 +0200, Carlos E. R. wrote:
> 
>> On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
>>>
>>> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
>>>
>>>> How about a list of favourite options to common commands? Mine is "ls
>>>> -ltr", which shows files in chronological order. Often I'm looking
>>>> for a file I worked on recently but can't remember its exact name; it
>>>> shows up near the end of an ls -ltr list.
>>>
>>> Or drop the “r” and have it show up near the top.
>>
>> The top is out of the screen and not visible.
> 
> *nix user 101: figure out at least 3 simple (i.e. routine)
> command-line techniques for dealing with that.

ls -lrt | less

less also adds the search functions which can be handy.

[toc] | [prev] | [next] | [standalone]


#71014

From"Carlos E. R." <robin_listas@es.invalid>
Date2025-08-14 10:51 +0200
Message-ID<mg5mc1FejkoU1@mid.individual.net>
In reply to#70957
On 2025-08-14 01:42, Lawrence D'Oliveiro wrote:
> On Wed, 13 Aug 2025 23:40:20 +0200, Carlos E. R. wrote:
> 
>> On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
>>>
>>> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
>>>
>>>> How about a list of favourite options to common commands? Mine is
>>>> "ls -ltr", which shows files in chronological order. Often I'm
>>>> looking for a file I worked on recently but can't remember its
>>>> exact name; it shows up near the end of an ls -ltr list.
>>>
>>> Or drop the “r” and have it show up near the top.
>>
>> The top is out of the screen and not visible.
> 
> *nix user 101: figure out at least 3 simple (i.e. routine)
> command-line techniques for dealing with that.

And so more typing.

-- 
Cheers,
        Carlos E.R.

[toc] | [prev] | [next] | [standalone]


#71015

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2025-08-14 08:53 +0000
Message-ID<107k85h$cms9$1@dont-email.me>
In reply to#71014
On Thu, 14 Aug 2025 10:51:13 +0200, Carlos E. R. wrote:

> On 2025-08-14 01:42, Lawrence D'Oliveiro wrote:
>>
>> On Wed, 13 Aug 2025 23:40:20 +0200, Carlos E. R. wrote:
>>
>>> On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
>>>>
>>>> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
>>>>
>>>>> How about a list of favourite options to common commands? Mine
>>>>> is "ls -ltr", which shows files in chronological order. Often
>>>>> I'm looking for a file I worked on recently but can't remember
>>>>> its exact name; it shows up near the end of an ls -ltr list.
>>>>
>>>> Or drop the “r” and have it show up near the top.
>>>
>>> The top is out of the screen and not visible.
>>
>> *nix user 101: figure out at least 3 simple (i.e. routine)
>> command-line techniques for dealing with that.
>
> And so more typing.

Less then the keystrokes you wasted telling me that.

[toc] | [prev] | [next] | [standalone]


#70975

FromCharlie Gibbs <cgibbs@kltpzyxm.invalid>
Date2025-08-14 01:30 +0000
Message-ID<%_anQ.7961$w%ja.3000@fx37.iad>
In reply to#70949
On 2025-08-13, Carlos E. R. <robin_listas@es.invalid> wrote:

> On 2025-08-13 23:31, Lawrence D'Oliveiro wrote:
>
>> On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:
>> 
>>> How about a list of favourite options to common commands?
>>> Mine is "ls -ltr", which shows files in chronological order.
>>> Often I'm looking for a file I worked on recently but can't
>>> remember its exact name; it shows up near the end of an
>>> ls -ltr list.
>> 
>> Or drop the “r” and have it show up near the top.
>
> The top is out of the screen and not visible.

'zackly.

-- 
/~\  Charlie Gibbs                  |  Growth for the sake of
\ /  <cgibbs@kltpzyxm.invalid>      |  growth is the ideology
 X   I'm really at ac.dekanfrus     |  of the cancer cell.
/ \  if you read it the right way.  |    -- Edward Abbey

[toc] | [prev] | [next] | [standalone]


#70971

Fromrbowman <bowman@montana.com>
Date2025-08-14 01:05 +0000
Message-ID<mg4r3mF9n13U13@mid.individual.net>
In reply to#70934
On Wed, 13 Aug 2025 19:34:11 GMT, Charlie Gibbs wrote:

> How about a list of favourite options to common commands? Mine is "ls
> -ltr", which shows files in chronological order.
> Often I'm looking for a file I worked on recently but can't remember its
> exact name; it shows up near the end of an ls -ltr list.

I prefer 'ls -lrt' :)

find . -name "*.c" | xargs grep -i SomeFunction

When I use tcsh I had a more elegant version but bash requires writing 
little functions for things like that. I switched to bash when all the 
Linux distros went that way but never became very proficient in 
crafting .bashrc files.

[toc] | [prev] | [next] | [standalone]


#71140

FromRene Kita <mail@rkta.de>
Date2025-08-15 04:55 +0000
Message-ID<107mej8$tv7o$1@dont-email.me>
In reply to#70934
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
> On 2025-08-13, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> 
>> <https://www.zdnet.com/article/im-a-linux-expert-and-here-are-6-commands-i-cant-live-without/>
>>
[...]
> 
> zip
> unzip
> rsync
> diff
> cmp
> cut
> uniq
> 
> Favourite one-liner:
> grep foo * | cut -d: -f1 | uniq

Why not 'grep -l foo *'?

[toc] | [prev] | [next] | [standalone]


#71145

FromLawrence D’Oliveiro <ldo@nz.invalid>
Date2025-08-15 05:38 +0000
Message-ID<107mh57$ug1p$1@dont-email.me>
In reply to#71140
On Fri, 15 Aug 2025 04:55:04 -0000 (UTC), Rene Kita wrote:

> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>
>> Favourite one-liner:
>> grep foo * | cut -d: -f1 | uniq
> 
> Why not 'grep -l foo *'?

To “UUOC” (“Useless Use Of Cat”), we can add a new category: How about 
“UUOCP” (“Useless Use Of Complicated Pipelines”)?

[toc] | [prev] | [next] | [standalone]


#71713

FromRene Kita <mail@rkta.de>
Date2025-08-20 05:54 +0000
Message-ID<1083nvh$57gt$1@dont-email.me>
In reply to#71145
Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
> On Fri, 15 Aug 2025 04:55:04 -0000 (UTC), Rene Kita wrote:
> 
>> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>>
>>> Favourite one-liner:
>>> grep foo * | cut -d: -f1 | uniq
>> 
>> Why not 'grep -l foo *'?
> 
> To “UUOC” (“Useless Use Of Cat”), we can add a new category: How about 
> “UUOCP” (“Useless Use Of Complicated Pipelines”)?

I like that.

Somewhere downthread was another one using find and xargs. While this
might be necessary under some circumstances find usually comes with
-exec and shells have extended globbing to recursively go into
directories.

But I refrained from my duty call...

Also I'm far from being a Linux Expert.

[toc] | [prev] | [next] | [standalone]


#71347

FromStéphane CARPENTIER <sc@fiat-linux.fr>
Date2025-08-16 08:33 +0000
Message-ID<68a04246$0$24825$426a74cc@news.free.fr>
In reply to#70934
Le 13-08-2025, Charlie Gibbs <cgibbs@kltpzyxm.invalid> a écrit :
> On 2025-08-13, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
>> <https://www.zdnet.com/article/im-a-linux-expert-and-here-are-6-commands-i-cant-live-without/>
>>
>> What’s an obvious omission from his list? To me, it’s the “find”
>> command. I have millions of files on my main machine (quite literally,
>> I would say), and it is the most convenient and powerful way of
>> finding something I might have worked on years ago, and mostly
>> forgotten about since then.
>>
>> (Which is a lot of things.)
>
> zip
> unzip
> rsync
> diff

I never use "diff". I really don't like the way it's displayed. I'm using
"vimdiff" or "nvim -d" a lot, because at the same time it's easier to
see what I want and it's easier to make the right changes.

> cmp
> cut
> uniq
>
> Favourite one-liner:
> grep foo * | cut -d: -f1 | uniq

Without sorting before the uniq command, I'd say you have to be pretty
sure about your files.

> How about a list of favourite options to common commands?
> Mine is "ls -ltr", which shows files in chronological order.
> Often I'm looking for a file I worked on recently but can't
> remember its exact name; it shows up near the end of an
> ls -ltr list.

I've an alias for "ls -Altr" for the same reason.

-- 
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

[toc] | [prev] | [next] | [standalone]


#71409

FromRich <rich@example.invalid>
Date2025-08-16 18:28 +0000
Message-ID<107qijt$1rj1g$4@dont-email.me>
In reply to#71347
Stéphane CARPENTIER <sc@fiat-linux.fr> wrote:
> I never use "diff". I really don't like the way it's displayed. I'm using
> "vimdiff" or "nvim -d" a lot, because at the same time it's easier to
> see what I want and it's easier to make the right changes.

diff's default output is an 'ed script' which is not very human 
readable at all.

The unified output (-u option) provides a 'diff' view that is much more 
ameniable to being understood by humans.

[toc] | [prev] | [next] | [standalone]


#71413

FromCharlie Gibbs <cgibbs@kltpzyxm.invalid>
Date2025-08-16 19:05 +0000
Message-ID<zD4oQ.39808$CQJe.14740@fx14.iad>
In reply to#71409
On 2025-08-16, Rich <rich@example.invalid> wrote:

> Stéphane CARPENTIER <sc@fiat-linux.fr> wrote:
>
>> I never use "diff". I really don't like the way it's displayed. I'm using
>> "vimdiff" or "nvim -d" a lot, because at the same time it's easier to
>> see what I want and it's easier to make the right changes.
>
> diff's default output is an 'ed script' which is not very human 
> readable at all.
>
> The unified output (-u option) provides a 'diff' view that is much more 
> ameniable to being understood by humans.

Horses for courses.  I can read the standard diff output just fine.
Whether I qualify as "human" is open to discussion.

I wrote a little program called "cmpdir" which compares the contents
of two directories by doing an ls -lR on both of them (or dir /s in
the MS-DOS/Windows version), diffing them, and printing the significant 
differences, interspersed with lines indicating which directory they're
in.  There are probably some command-line options and scripting which
would do it, but it was faster for me to cobble together some C code.
-- 
/~\  Charlie Gibbs                  |  Growth for the sake of
\ /  <cgibbs@kltpzyxm.invalid>      |  growth is the ideology
 X   I'm really at ac.dekanfrus     |  of the cancer cell.
/ \  if you read it the right way.  |    -- Edward Abbey

[toc] | [prev] | [next] | [standalone]


#71414

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2025-08-16 21:08 +0100
Message-ID<107qof3$1tdn9$1@dont-email.me>
In reply to#71413
On 16/08/2025 20:05, Charlie Gibbs wrote:
> There are probably some command-line options and scripting which
> would do it, but it was faster for me to cobble together some C code.

Amen...
-- 
It’s easier to fool people than to convince them that they have been fooled.
Mark Twain


[toc] | [prev] | [next] | [standalone]


#71416

FromStéphane CARPENTIER <sc@fiat-linux.fr>
Date2025-08-16 20:38 +0000
Message-ID<68a0ec5b$0$24818$426a74cc@news.free.fr>
In reply to#71413
Le 16-08-2025, Charlie Gibbs <cgibbs@kltpzyxm.invalid> a écrit :
> On 2025-08-16, Rich <rich@example.invalid> wrote:
>
>> Stéphane CARPENTIER <sc@fiat-linux.fr> wrote:
>>
>>> I never use "diff". I really don't like the way it's displayed. I'm using
>>> "vimdiff" or "nvim -d" a lot, because at the same time it's easier to
>>> see what I want and it's easier to make the right changes.
>>
>> diff's default output is an 'ed script' which is not very human 
>> readable at all.
>>
>> The unified output (-u option) provides a 'diff' view that is much more 
>> ameniable to being understood by humans.

I'm not impressed by the difference.

> Horses for courses.  I can read the standard diff output just fine.
> Whether I qualify as "human" is open to discussion.

I can read the output, too, but I don't see the point. I have vim which
I find very more useful. Mostly with long files with lot of differences.
And the bonus with vim is that I can easily change the file to report
some differences from one file to the other. Which I can't do with diff
(maybe diff provide the option but I don't know it).

> I wrote a little program called "cmpdir" which compares the contents
> of two directories by doing an ls -lR on both of them (or dir /s in
> the MS-DOS/Windows version), diffing them, and printing the significant 
> differences, interspersed with lines indicating which directory they're
> in.  There are probably some command-line options and scripting which
> would do it, but it was faster for me to cobble together some C code.

I don't need that, but I can understand its usefulness.

-- 
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io

[toc] | [prev] | [next] | [standalone]


#71423

FromLawrence D’Oliveiro <ldo@nz.invalid>
Date2025-08-17 00:38 +0000
Message-ID<107r89i$20k71$6@dont-email.me>
In reply to#71416
On 16 Aug 2025 20:38:51 GMT, Stéphane CARPENTIER wrote:

> On 2025-08-16, Rich <rich@example.invalid> wrote:
>
>> The unified output (-u option) provides a 'diff' view that is much
>> more ameniable to being understood by humans.
> 
> I'm not impressed by the difference.

By displaying the common lines just once, as surrounding context, the “-u” 
format provides cues so a tool like patch(1) can find the place in the 
file to substitute the old lines with the new ones. Not relying on strict 
line numbers to find the place is the secret to how patch is (usually) 
able to do its work on a file that already has patches applied from other 
sources.

This facility for merging patches from multiple sources is the foundation 
on which open-source development collaboration is built.

[toc] | [prev] | [next] | [standalone]


#71473

FromNuno Silva <nunojsilva@invalid.invalid>
Date2025-08-17 09:08 +0100
Message-ID<107s2l2$25lfa$2@dont-email.me>
In reply to#71423
On 2025-08-17, Lawrence D’Oliveiro wrote:

> On 16 Aug 2025 20:38:51 GMT, Stéphane CARPENTIER wrote:
>
>> On 2025-08-16, Rich <rich@example.invalid> wrote:
>>
>>> The unified output (-u option) provides a 'diff' view that is much
>>> more ameniable to being understood by humans.
>> 
>> I'm not impressed by the difference.
>
> By displaying the common lines just once, as surrounding context, the “-u” 
> format provides cues so a tool like patch(1) can find the place in the 
> file to substitute the old lines with the new ones. Not relying on strict 
> line numbers to find the place is the secret to how patch is (usually) 
> able to do its work on a file that already has patches applied from other 
> sources.

Do you know of papers, reports, or the like about this?

I'm not doubting your comments, it's just that this sounds like a topic
which would be interesting to me to read about, if somebody has written
down that evolution, how it happened, &c..

> This facility for merging patches from multiple sources is the foundation 
> on which open-source development collaboration is built.

-- 
Nuno Silva

[toc] | [prev] | [next] | [standalone]


Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →

Back to top | Article view | comp.os.linux.misc


csiph-web