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:
@@ -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)
|
||||
|
||||
16
zsh/file-type-info-with-file.md
Normal file
16
zsh/file-type-info-with-file.md
Normal 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.
|
||||
Reference in New Issue
Block a user