Skip to main content
added 14 characters in body
Source Link
matanox
  • 632
  • 1
  • 8
  • 16

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 accomplishmaintain the shell window's correct view of the recreated folderdirectory at all times?

Currently I found cd . being the simplest command solving thisworkaround, but of course it needs to be used every time. Would be nice being able to avoid that alltogether.

If relevant, this is Ubuntu.

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 accomplish the shell window's correct view of the recreated folder?

Currently I found cd . being the simplest command solving this.

If relevant, this is Ubuntu.

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.

Source Link
matanox
  • 632
  • 1
  • 8
  • 16

refreshing terminal window's view of a recreated directory

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 accomplish the shell window's correct view of the recreated folder?

Currently I found cd . being the simplest command solving this.

If relevant, this is Ubuntu.