5

Chaining commands within `watch`

view full story
linux-howto

http://unix.stackexchange.com – Ok, this is driving me a bit nuts. I'm trying to watch the number of files in a set of subdirectories. find . | wc -l correctly returns the number of sub-folders and files. However, watch 'find . | wc -l' returns watch: find . | wc -l: No such file or directory in the watch screen. It returns the same with double-quotes, or backquotes (`). This is on an ancient version of bash: GNU bash, version 3.00.16(2)-release (i486-slackware-linux-gnu) Copyright (C) 2004 Free Software Foundation, Inc. This is also an embedded device, so it's running busybox (BusyBox v1.1.0 (2010.06.14-02:47+0000) (HowTos)