Text
stringlengths
16
168
Code
stringlengths
5
107
Show line numbers for policy.pdf
cat -n policy.pdf
File compression with gzip
find . -type f -execdir gzip {} \
Test integrity of executable.exe.zip
zip -T executable.exe.zip
Show non-blank line numbers for document.docx
cat -b document.docx
List proposal.docx contents with suppression of repeated empty lines
cat -s proposal.docx
Out of database.sql.zip, remove database.sql.
zip -d database.sql.zip database.sql
Print each file separately
ls -1
Transfer audio.mp3 forcefully to reports, asking for confirmation, and treating destination as a file
mv -ifT audio.mp3 reports
silently list the contents of report.pdf
cat -q report.pdf
Move video.mp4 to images_backup and force overwrite it.
cp -f video.mp4 images_backup
List the contents of report.pdf while suppressing the repetitive blank lines.
cat -s report.pdf
Search for files with names containing 'document' and created in the last 24 hours
find . -type f -name "*document*" -ctime -1
Duplicate executable.exe to output and keep attributes unchanged while creating a hard link
cp -p -l executable.exe output
Extract files from policy.pdf.zip into templates_backup
unzip -d templates_backup policy.pdf.zip
Show hidden files with regular files.
ls -a
Create new archive document.docx.zip from report.pdf
zip -c document.docx.zip report.pdf
Sort files in a list according to size.
ls -S
Display non-printing characters while listing the contents of policy.pdf
cat -v policy.pdf
Ask before replacing script.py in music
mv -i script.py music
Make a backup copy of spreadsheet.xlsx and duplicate it to music_library with user approval to overwrite, preserve attributes, and overwrite
cp -i -p -b spreadsheet.xlsx music_library
Transfer presentation.pptx to scripts_backup and conduct a force overwrite
cp -f presentation.pptx scripts_backup