Quantcast
Channel: Why does `watch` make `ls /tmp` list contents of $HOME? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Stéphane Chazelas for Why does `watch` make `ls /tmp` list contents...

There are two main categories of watch commands (of the ones that are to run commands periodically, watch is not a standard command, there are even systems where watch does something completely...

View Article


Answer by thrig for Why does `watch` make `ls /tmp` list contents of $HOME?

The difference may be seen via strace: $ strace -ff -o bq watch sh -c 'ls\ /tmp/|wc -l' ^C $ strace -ff -o nobq watch sh -c 'ls /tmp/|wc -l' ^C $ grep exec bq* | grep sh...

View Article


Why does `watch` make `ls /tmp` list contents of $HOME?

I'm trying to watch number of files in my /tmp/ directory. For this I thought this command would work: watch sh -c 'ls /tmp/|wc -l' But it appears to work as if ls had no arguments. Namely, I'm in ~,...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>