On Thursday 24 November 2005 14:10, Ken Schneider wrote:
On Thu, 2005-11-24 at 10:23 +0200, Chadley Wilson wrote:
Greetings,
Been struggling for a while trying to figure out why my script keeps removing the hidden directories:
When you run ls -l as a user you get a listing without the .xxxxx files, But as root ls -l shows all anyway.
You want to use ls -a (list all files including hidden files without attributes, files beginning with a dot are considered hidden), ls -l means long listing, show all attributes of the file but not hidden files. Check the aliases set for your login with aliases to see what is set for the ls command.
For most purposes you probably want -A instead of -a, since -A will exclude . and .. A related topic is dotglob (see man bash)