Files
cheatsheet-tldr/tldr/windows/takeown

26 lines
618 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# takeown
> Take ownership of a file or directory.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/takeown>.
- Take ownership of the specified file:
`takeown /f {{path o ile}}`
- Take ownership of the specified directory:
`takeown /d {{path o\directory}}`
- Take ownership of the specified directory and all subdirectories:
`takeown /r /d {{path o\directory}}`
- Change ownership to the Administrator group instead of the current user:
`takeown /a /f {{path o ile}}`