how to prevent listing hidden files from been shown?
hi when i do "ls" in a terminal i get all the hidden files in my home listed now how do prevent it so that no-hidden files are shown and when i do "ls -a" it will show the hidden files as well?
thnx |
ls without any options should not display hidden files, AFAIK...
check in your ~/.bachrc file to make sure there isn't an alias set for ls which is giving it the "-a" option... Code:
cat ~/.bashrc | grep ls |
i couldn't find anything that says about ls.
thnx |
AFAIK only root will get hidden files with 'ls'. This behaviour is defined in /etc/bash.bashrc:
Code:
# ls color option depends on the terminal |
run the command
alias and all aliases will be shown. unalias ls is a quick fix that will only work for that login session |
when putting \ before a command, then the real command is executed and not the existing allias.
SO Code:
\ls To permantly fix it do what the others told you. If you are running as root all the time, stop doing it.... |
All times are GMT -5. The time now is 04:15 AM. |