Remove Permission Help needed.
How would i remove rwx permission for group and other users for all hidden files (except . and ..) inside /root using a one line command.
I have tried below command. Code:
# chmod og-rwx /root/.* As a result Code:
# ls -ld /root |
<redacted -- please delete>
|
Quote:
Code:
cd /root; ls -A | grep '^\.' | xargs chmod og-rwx |
Sorry, did not read the post properly :(. I apologize.
|
Quote:
Next time you think globbing is a Good Thing try running 'eval' (as in 'eval echo /root/.*') on the target or 'for ITEM in `eval echo /root/.*`; do readlink -f "${ITEM}"; done'. Else just remember "/." stands for the current directory ("/root" in your example) and "/.." for its parent directory (which would be "/"). I hope you see that using wildcards may well result in Something Completely Different than what you think you may expect... |
All times are GMT -5. The time now is 08:17 AM. |