1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 23:28:02 +00:00

Add File Type Info With File as a zsh til.

This commit is contained in:
jbranchaud
2015-10-04 13:25:51 -05:00
parent 18b33f1656
commit 0eaffb7269
2 changed files with 17 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,16 @@
# File Type Info With File
Use the `file` utility to determine the type of a file:
```bash
$ file todo.md
todo.md: ASCII English text
$ file Hello.java
Hello.java: ASCII C++ program text
$ file Hello.class
Hello.class: compiled Java class data, version 52.0
```
The `Hello.java` file isn't exactly a C++ program, but close enough.