Skip to content

Commit 0eaffb7

Browse files
committed
Add File Type Info With File as a zsh til.
1 parent 18b33f1 commit 0eaffb7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
232232
- [Clear The Screen](zsh/clear-the-screen.md)
233233
- [Create A File Descriptor with Process Substitution](zsh/create-a-file-descriptor-with-process-substitution.md)
234234
- [Do Not Overwrite Existing Files](zsh/do-not-overwrite-existing-files.md)
235+
- [File Type Info With File](zsh/file-type-info-with-file.md)
235236
- [Find Newer Files](zsh/find-newer-files.md)
236237
- [Global Substitution On The Previous Command](zsh/global-substitution-on-the-previous-command.md)
237238
- [Hexdump A Compiled File](zsh/hexdump-a-compiled-file.md)

zsh/file-type-info-with-file.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File Type Info With File
2+
3+
Use the `file` utility to determine the type of a file:
4+
5+
```bash
6+
$ file todo.md
7+
todo.md: ASCII English text
8+
9+
$ file Hello.java
10+
Hello.java: ASCII C++ program text
11+
12+
$ file Hello.class
13+
Hello.class: compiled Java class data, version 52.0
14+
```
15+
16+
The `Hello.java` file isn't exactly a C++ program, but close enough.

0 commit comments

Comments
 (0)