|
Bugzilla – Full Text Bug Listing |
| Summary: | ls options as root include -a rather than -A | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Benjamin Weber <benji> |
| Component: | Basesystem | Assignee: | Dr. Werner Fink <werner> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | lnussel |
| Version: | Beta 5 | ||
| Target Milestone: | --- | ||
| Hardware: | 64bit | ||
| OS: | SuSE Linux 10.1 | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Benjamin Weber
2006-02-24 08:47:52 UTC
I don't think I get your point here. Why is it a problem to copy all hidden files? If you use the shell's file completion feature it will always include `.' and `..'? copying all hidden files was just one example, but can you think of a good reason /for/ having . and .. in the path, given that it causes problems doing some things. for example to copy hidden files one could do: for i in $(ls -A | grep '^\.'); do cp $i /someplace; but as ls is aliased to "ls -a" then the above copies everything in the current folder, not just the hidden files, as -a overrides -A. Benjamin, what has `ls' to do with either of your examples? `ls' is no shell-builtin and `cp' neither? Your example would work because cp would omit `.' and `..' because they are directories. However changing LS_OPTIONS would change nothing of this behaviour. I'm sorry, if I were doing "cp -r" rather than just cp, then . and .. would not be excluded and everything would be copied. and changing LS_OPTIONS would change this behaviour, as with -a in LS_OPTIONS gives : lcars:/home/benji # ls -A | head -n 2 . .. and without -a in LS_OPTIONS gives: benji@lcars:~> ls -A | head -n 2 .bash_history .bashrc OK I got it. You can use quotes with the command this would not apply the alias including the $LS_OPTIONS. Werner: Please decide what should be done. We do nothing. Root has to see all files even hidden files. This is a security requirement and will not changed. I think you are misunderstanding, -A still shows all files even hidden files, it just doesn't show "." and ".." (current and parent directories) If you can think of a good reason for including these in the directory listings by default then I'll understand, but afaik other distros all have -A in options by default, not -a. OK, I've changed -a to -A why did you change l and la? I don't care about plain ls but for l -A sucks. I do want to see the permissions of the directory I am in when using l. l is suse specific anyways and I loved it just the way it used to be. Please discuss this with Benjamin Weber. He didn't even mention l or la, only ls. OK -A for ls and -a for l and la |