2024-08-20 23:11:53 +05:30
|
|
|
<h1>fileinfo</h1>
|
2024-08-20 23:09:18 +05:30
|
|
|
A simple C++ program that displays information about files and folders.
|
2024-08-20 23:37:33 +05:30
|
|
|
<h2>Installation</h2>
|
|
|
|
First, install libmagic-dev:<br>
|
|
|
|
<pre>
|
|
|
|
sudo apt install libmagic-dev
|
|
|
|
</pre><br>
|
|
|
|
Now, compile the source code. <b>Note the <code>-lmagic</code> at the end!</b><br>
|
|
|
|
<pre>
|
2024-08-22 02:14:01 +05:30
|
|
|
g++ <path/to/source.cpp> -lmagic -o fileinfo
|
2024-08-20 23:37:33 +05:30
|
|
|
</pre><br>
|
|
|
|
And finally, copy that executable to /usr/local/bin folder.<br>
|
|
|
|
<pre>
|
|
|
|
sudo cp fileinfo /usr/local/bin/
|
|
|
|
</pre>
|
2024-08-20 23:11:53 +05:30
|
|
|
<h2>Usage</h2>
|
2024-08-20 23:12:13 +05:30
|
|
|
<pre>
|
2024-08-20 23:11:53 +05:30
|
|
|
./a.out [args] filename ...<br>
|
|
|
|
Args:<br>
|
|
|
|
-A Output absolute path<br>
|
|
|
|
-E Do not show emojis<br>
|
2024-08-20 23:12:13 +05:30
|
|
|
</pre>
|