1

I got this answer for Is it possible to chain two consecutive find commands? last year.

Today I wanted to test the latest recommendation to pipe two find commands together.

find ... -print0 | find -files0-from - ...

To my surprise it did not work and I got this error:

find: unknown predicate `-files0-from'

I checked the file version using file --version and it was find (GNU findutils) 4.8.0

This confuses me, as I use the Ubuntu 22.04.3 LTS and run apt update && apt upgrade every day.

So, how can I update my find command to the latest version?

Saeed Neamati
  • 793
  • 2
  • 7
  • 20
  • 1
    If you were using the latest Ubuntu release, you'd be using 4.9.0-3ubuntu1, but you're two releases behind that (ie. 22.04, 22.10 then 23.04) fyi: https://changelogs.ubuntu.com/changelogs/pool/main/f/findutils/findutils_4.9.0-5/changelog show changes to the version on my Ubuntu mantic system; but it's useful to contrast your older version up to latest available in Ubuntu repositories... – guiverc Sep 13 '23 at 07:50
  • Install Ubuntu 22.10 or 23.04. coreutils don't get upgraded. – Rinzwind Sep 13 '23 at 07:51
  • 1
    @Rinzwind, Ubuntu 22.10 is EOL thus not a great idea; 23.04 the only fully supported option – guiverc Sep 13 '23 at 07:58
  • 1
    @guiverc IMHO the linked answer does not answer this question. @Rinzwind's remark that coreutils don't get upgraded seems to me the real answer. – Jos Sep 13 '23 at 08:44
  • @guiverc, then we can't update find individually? We are locked to the entire GNU? – Saeed Neamati Sep 13 '23 at 08:44
  • 2
    Fair enough @Jos, to me it's the side effect of Ubuntu being a stable release system (like Debian upstream of Ubuntu), which I see covered in psusi's answer in the duplicate myself... – guiverc Sep 13 '23 at 08:56
  • You can install findutils from Ubuntu 23.04 in Ubuntu 22.04 using this command: wget -c http://mirrors.kernel.org/ubuntu/pool/main/f/findutils/findutils_4.9.0-3ubuntu1_amd64.deb && sudo apt install ./findutils_4.9.0-3ubuntu1_amd64.deb If you want to accept this comment as an answer I'll reopen this question and post it as an answer so that you can accept it. If not simply ignore this comment. – karel Sep 13 '23 at 09:04
  • @karel, that's exactly what I was searching for. Thank you. Please do that. – Saeed Neamati Sep 13 '23 at 09:15

1 Answers1

2

You can install findutils from Ubuntu 23.04 in Ubuntu 22.04 using these commands:

wget -c http://mirrors.kernel.org/ubuntu/pool/main/f/findutils/findutils_4.9.0-3ubuntu1_amd64.deb 
sudo apt install ./findutils_4.9.0-3ubuntu1_amd64.deb
karel
  • 114,770
  • 3
    Just be aware that when manually installing software from other sources (including later Ubuntu releases, Debian etc.) you might break some dependencies at a later stage. Use with caution. – Artur Meinild Sep 13 '23 at 09:19