15 Oct
2015
15 Oct
'15
10:43
On 10/15/2015 09:40 AM, Per Jessen wrote:
Does anyone know of a way of limiting output from "find" which doesn't involve looking up the entire directory and piping through head etc ?
Not what I want: find <dir> -type f | head -1000
I was hoping for something like this:
find <dir> -type f -n 1000
"-n 1000" = give me only the first 1000 names.
There's nothing wrong with limiting via "|head", as find(1) will immediately stop traversing the directories when it receives EPIPE. Another remark: "head -NUM" is highly deprecated; use "head -nNUM" instead. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org