mirror of
https://github.com/jbranchaud/til
synced 2026-01-06 16:48:01 +00:00
Add Figure Out The Week Of The Year From The Terminal as a unix til
This commit is contained in:
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
||||
For a steady stream of TILs from a variety of rocketeers, checkout
|
||||
[til.hashrocket.com](https://til.hashrocket.com/).
|
||||
|
||||
_844 TILs and counting..._
|
||||
_845 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -751,6 +751,7 @@ _844 TILs and counting..._
|
||||
- [Display Free Disk Space](unix/display-free-disk-space.md)
|
||||
- [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md)
|
||||
- [Exclude A Directory With Find](unix/exclude-a-directory-with-find.md)
|
||||
- [Figure Out The Week Of The Year From The Terminal](unix/figure-out-the-week-of-the-year-from-the-terminal.md)
|
||||
- [File Type Info With File](unix/file-type-info-with-file.md)
|
||||
- [Find Files With fd](unix/find-files-with-fd.md)
|
||||
- [Find Newer Files](unix/find-newer-files.md)
|
||||
|
||||
15
unix/figure-out-the-week-of-the-year-from-the-terminal.md
Normal file
15
unix/figure-out-the-week-of-the-year-from-the-terminal.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Figure Out The Week Of The Year From The Terminal
|
||||
|
||||
Want to know what week of the year we are currently in? You can use the
|
||||
[`date`](http://man7.org/linux/man-pages/man1/date.1.html) utility to figure it
|
||||
out.
|
||||
|
||||
```bash
|
||||
$ date +%V
|
||||
```
|
||||
|
||||
The `%V` is a formatting directive with this description:
|
||||
|
||||
> ISO week number, with Monday as first day of week (01..53)
|
||||
|
||||
[source](https://stackoverflow.com/questions/3237882/get-week-of-year-from-day-of-year)
|
||||
Reference in New Issue
Block a user