On 2/23/26 23:26, Pádraig Brady wrote:
   kill -l $?       # show if last command was terminated with signal

I think this one is not correct: $? is the exit code of the previous command, 
not the signal.

  $ timeout -vs HUP 3 sleep 10
  timeout: sending signal HUP to command 'sleep'
  $ env kill -l $?
  kill: unknown signal: 124

      mv *.jpg ./photos/

This form may fail if there are too many jpg files,
so we should avoid examples like that.
Perhaps it's worth showing:

    find . -name '*.jpg' -print0 | xargs -r0 mv -t photos/

I like showing the -t option, because it is often very useful.
Maybe avoid the NUL-termination options and --no-run-if-empty?

     find -name '*.jpg' -exec mv -t photos/ '{}' +

Not sure this is easier to read for beginners; find(1) is another world.

Have a nice day,
Berny

Reply via email to