I use a program that recreates a certain directory structure each time it is run, then populates it with all kinds of data.
I keep a terminal window "open at" one of the subdirectories of that directory, where I wish to list and browse the data being created.
However in that window, each time the program re-runs, listing the current directory shows 0 files - bash isn't up-to-date on the directory - presumably because it had been recreated. My workaround is to cd again to the same directory, but is there something else that will maintain the shell window's correct view of the recreated directory at all times?
Currently I found cd . being the simplest workaround, but of course it needs to be used every time. Would be nice being able to avoid that alltogether.
If relevant, this is Ubuntu.
cd ..; watch "ls subdir"watch ls subdiras an answer