Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Differentiate touch and truncate #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ $ count ~/Pictures/*.jpg
64
```

## Create an empty file
## Create or truncate a file

Alternative to `touch`.
Alternative to `truncate -s0`.

```shell
:>file
Expand All @@ -513,6 +513,17 @@ Alternative to `touch`.
>file
```

## Create or update modification time of a file

Alternative to `touch`.

```shell
:>>file

# OR (shellcheck warns for this)
>>file
```

# FILE PATHS

## Get the directory name of a file path
Expand Down