1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-04 05:35:31 +02:00

assoc, attrib: update page (#8349)

This commit is contained in:
Emily Grace Seville 2022-08-24 05:20:07 +10:00 committed by GitHub
parent 17b6ad9943
commit 38d904a408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

View file

@ -1,16 +1,16 @@
# assoc
> Display or modify file extension associations.
> Display or change associations between file extensions and file types.
> More information: <https://docs.microsoft.com/windows-server/administration/windows-commands/assoc>.
- Display all associated filetypes:
- List all associations between file extensions and file types:
`assoc`
- Display the associated filetype for a specific extension:
- Display the associated file type for a specific extension:
`assoc {{.txt}}`
- Modify the associated filetype for a specific extension:
- Set the associated file type for a specific extension:
`assoc {{.txt}}={{txtfile}}`
`assoc .{{txt}}={{txtfile}}`

View file

@ -1,28 +1,28 @@
# attrib
> Displays or changes file and directory attributes.
> Display or change attributes of files or directories.
> More information: <https://docs.microsoft.com/windows-server/administration/windows-commands/attrib>.
- Display the attributes of the files in the current directory:
- Display all set attributes of files in the current directory:
`attrib`
- Display the attributes of the files in the current directory and sub-directories:
- Display all set attributes of files in a specific directory:
`attrib /S`
`attrib {{path\to\directory}}`
- Display the attributes of the files and directories in the current directory and sub-directories:
- Display all set attributes of files and [d]irectories in the current directory:
`attrib /S /D`
`attrib /d`
- Add the read-only attribute to a file:
- Display all set attributes of files in the current directory and [s]ub-directories:
`attrib +R {{document.txt}}`
`attrib /s`
- Remove the system and hidden attributes of a file:
- Add the `[r]ead-only` or `[a]rchive` or `[s]ystem` or `[h]idden` or `not content [i]ndexed` attribute to files or directories:
`attrib -S -H {{document.txt}}`
`attrib +{{r|a|s|h|i}} {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}`
- Add the hidden attribute to a directory:
- Remove a specific attribute of files or directories:
`attrib +H {{path\to\directory}}`
`attrib -{{r|a|s|h|i}} {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}`