On 4/22/24 23:18, James Youngman wrote:

locate-ls() {
    locate -0 "$@" | xargs -0 ls -ld
}

I'd suggest using -r there also, so that if no files are found, the user
doesn't get a surprising listing of just "." (with its mod-time and so
forth).

$ xargs --help | grep empty
  -r, --no-run-if-empty        if there are no arguments, then do not run 
COMMAND;

Good point, thanks.

Have a nice day,
Berny

Reply via email to