Files
Single Files
Create an empty PDF file for testing:
echo -e "%PDF-1.4\n%%EOF" > empty.pdf
Read the file:
$ pdftotext example.pdf - | less
$ pdf2txt example.pdf -o -
Examime the file's metadata:
# Full deep metadata & forensic use
exiftool example.pdf
# Fast, readable metadata
pdfinfo example.pdf
Archives
An archive is a single file that contains multiple files or folders bundled together, often preserving their directory structure, metadata, and permissions. Examples are .zip
, .tar
, .7z
, .rar
, etc.
A ZIP file is a widely used compressed archive format that bundles multiple files into one while reducing their size for easier storage and transfer.
# Extract files
unzip example.zip
If compatibility issues with zip
...
$ unzip example.zip
Archive: example.zip
skipping: joomla/.DS_Store need PK compat. v5.1 (can do v4.6)
Try with 7z
!
Compressed Files
A compressed file is a file whose size has been reduced using an algorithm (e.g., DEFLATE, gzip, bzip2). It contains one file that’s been made smaller. Examples are .gz
, .bz2
, .xz
, etc.
Extract files:
# Single file
gzip -d file.gz
gunzip file.gz
# Archive
tar -xzf archive.tar.gz
Last updated
Was this helpful?