tinycodinglm / sys /7zip-0000.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame Contribute Delete
1.58 kB
opencode trace
System You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing c...

You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies.

User

How do I create, list, test and extract archives with the 7z command line on Windows and Linux? Show a/x/e/l/t commands and output dir, password and compression level. Include code examples.

Assistant

7z syntax: 7z <command> [switches] archive [files...] (Debian/Ubuntu 7z manpage; 7-Zip docs).

bash
7z a backup.7z src/            # add (recursive)
7z l backup.7z                 # list contents
7z t backup.7z                 # test integrity
7z x backup.7z -oout/          # extract WITH full paths to out/
7z e backup.7z -oout/          # extract WITHOUT directory names
7z a -tzip docs.zip "*.txt"    # explicit type
7z a -pSECRET -mx=9 s.7z f/    # password + ultra level (1 fastest..9 ultra)
7z x -so backup.7z file | head # to stdout

Variants: 7z full+plugins, 7zz single-binary, 7za major formats, 7zr LZMA-only. x preserves paths, e flattens; quote wildcards with spaces.