0

If I want to change the group of the directory I'm in to root, I assumed the command would be: sudo chgrp root but then I end up getting a chgrp: missing operand after ‘root’. Is there a keyword or shortcut that specifies the working directory without having to type out the path manually? Had trouble finding anything through google, thanks.

  • $PWD will contain the working directory – rr0ss0rr May 17 at 15:43
1

In every directory, . represents the directory itself:

sudo chgrp root .

will change the group owning the current directory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.