mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 02:59:54 +02:00
Docs autoview pwd touch (#2068)
* [ADD] Add draft documentation for autoview * [ADD] Add draft documentation for pwd * [ADD] Add draft documentation for touch * [MOD] Improve description and add examples Add the use of `textview` and `binaryview`. Add examples for single value, source file and binary file.
This commit is contained in:
committed by
GitHub
parent
a30901ff7d
commit
821d44af54
43
docs/commands/touch.md
Normal file
43
docs/commands/touch.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# touch
|
||||
|
||||
Create a file in the current or an already existent directory.
|
||||
It has no effect on existing files.
|
||||
Unlike GNU touch, the access time and the modified time are not updated.
|
||||
|
||||
`-h`, `--help`
|
||||
Display help message.
|
||||
|
||||
## Examples
|
||||
|
||||
Create a file in an empty folder. Then touch the file and list files again to observe that the modified time has not been updated.
|
||||
|
||||
```shell
|
||||
> ls
|
||||
> touch file.ext; ls
|
||||
──────────┬─────────────
|
||||
name │ file.ext
|
||||
type │ File
|
||||
size │ 0 B
|
||||
modified │ 0 secs ago
|
||||
──────────┴─────────────
|
||||
> touch file.ext; ls
|
||||
──────────┬───────────
|
||||
name │ file.ext
|
||||
type │ File
|
||||
size │ 0 B
|
||||
modified │ 10 secs ago
|
||||
──────────┴───────────
|
||||
```
|
||||
|
||||
Create a file within an already existent folder.
|
||||
|
||||
```shell
|
||||
> mkdir dir
|
||||
> touch dir/file.ext; ls dir
|
||||
──────────┬───────────
|
||||
name │ dir/file.ext
|
||||
type │ File
|
||||
size │ 0 B
|
||||
modified │ 0 secs ago
|
||||
──────────┴───────────
|
||||
```
|
Reference in New Issue
Block a user