So here are some handy tips, I use for my daily work:
- Directory listing on Linux and Windows
- This is on Linux/Unix
- This is on Windows
- Listing contents of archive files
- Listing tar file contents
- Listing tar.gz file contents
- Listing the contents of a tar.bz2 archive
- Listing the contents of a Java archive (JAR,WAR,EAR etc)
- Listing contents of ZIP Archive. Assuming unzip is been installed on the linux box.
- Listing contents of RAR archive. Assuming unrar is been installed on the linux box.
- Listing contents of GZIP or GUNZIP or GZCAT or ZCAT archive. Assuming either of these commands are installed on Linux box.
gzip -l gziparchive.gz
gunzip -l gunziparchive.gz
zcat -l zcatarchive.Z
Ever wonder how to see all the subfolders under main parent folder. Here is the trick to list all files and folders recursively.
ls -R -1
dir /s /b
On Linux/Unix and Windows, lots of time, in day's work it happens that we come across JAR, TAR, GZ,BZIP, RAR etc archive formats and before opening those FTPed or SCPed or magically appeared archives we do like to see if those are right archives.
So here are some tips on that:
tar -tvf tararchive.tar
tar -ztvf gzippedtararchive.tar.gz
tar -jtvf file.tar.bz2
jar tvf jararchive.jar
unzip -l zippedarchive.zip
unrar l rararchive.rar
Please let me know if you have any such tricks to share with our readers. Feel free to put it in comments.