FIND YOUR NEXT FEW LINES

The snippet library.

Small, practical examples. Search by task or narrow things down below.

10 snippets foundClear filters
Linux CommandsArchive integrity & packaging

Append a new member to an uncompressed tar

Linux Commands: Use tar -r for an existing uncompressed archive; compressed tar files cannot be appended this way.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Archive filenames safely with null delimiters

Linux Commands: Use find -print0 with tar --null to preserve spaces and embedded newlines in filenames.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Check the integrity of a gzip stream

Linux Commands: Use gzip -t to verify a compressed file without extracting it.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Compress a stream to a chosen filename

Linux Commands: Use gzip -c to leave the source file untouched and choose the destination explicitly.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Create an archive from an explicit file list

Linux Commands: Use tar -T for a controlled list of relative archive members.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Exclude generated files from an archive

Linux Commands: Place exclude options before the input paths to control archive membership.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Read concatenated gzip members

Linux Commands: GNU gzip decompresses concatenated gzip members in order.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Read one archived file to standard output

Linux Commands: Use tar -O with an explicit member name instead of writing files to disk.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Remove a leading directory while extracting

Linux Commands: Use strip-components only after inspecting a trusted archive layout.

Linux Commands✓ Tested
Linux CommandsArchive integrity & packaging

Verify a file against a checksum manifest

Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.

Linux Commands✓ Tested