Text
stringlengths 16
168
| Code
stringlengths 5
107
|
---|---|
If the parent directories and directory documents don't already exist, create them.
|
mkdir -p documents
|
Transfer presentations to music_library and, if required, prompt before overwriting
|
cp -ir presentations music_library
|
Examine video.mp4.zip for consistency.
|
unzip -t video.mp4.zip
|
Test presentation.pptx.zip for errors
|
unzip -t presentation.pptx.zip
|
Copy proposal.docx to music_library, making a backup copy of the original files.
|
cp -b -p proposal.docx music_library
|
Find directories modified more than 30 days ago
|
find . -type d -mtime +30
|
Print executable.exe while suppressing the output from the buffer.
|
cat -u executable.exe
|
Show inode numbers of files
|
ls -i
|
Make executable.exe.zip that includes report.pdf
|
zip -c executable.exe.zip report.pdf
|
Display files in order of modification timestamp
|
ls -t
|
Zip templates recursively
|
zip -r templates templates
|
Files should be sorted with human-readable sizes in reverse order based on size and modification time.
|
ls -Sltrh
|
Display characters for executable.exe that aren't printed
|
cat -v executable.exe
|
Ignore directory structure when zipping configuration.ini
|
zip -j photo.png.zip configuration.ini
|
List all files with names starting with "image" showing inode numbers
|
ls -i image*
|
Provide password '*.txt' to unzip policy.pdf.zip
|
unzip -P *.txt policy.pdf.zip
|
Output the last 20 lines of video.mp4
|
cat video.mp4 | tail -n 20
|
Concatenate report.pdf and report.pdf, numbering non-empty output lines and showing non-printing characters and tabs as '^I'
|
cat -b -vT report.pdf report.pdf
|
Move script.py to downloads, handling it as though it were a regular file.
|
mv -T script.py downloads
|
Sort files by size and display detailed information in long format
|
ls -Sl
|
Pack photo.png without any archive paths
|
zip -j photo.png.zip photo.png
|
Copy script.py to documents_archive while preserving characteristics.
|
cp -p script.py documents_archive
|
Take remove the files from spreadsheet.xlsx.zip that provide verbose output.
|
unzip -v spreadsheet.xlsx.zip
|
Extract files from document.docx.zip into archive
|
unzip -d archive document.docx.zip
|
Show hidden files and directories with descriptive text and colourful images.
|
ls -alG
|
Fill database.sql with executable.exe.zip
|
zip -c database.sql.zip executable.exe
|
Copy all files from 'temp' to 'images', then compress them into a zip file named 'script.py.zip'.
|
cp /temp/* /images/ | zip -r /images/script.py.zip /images/*
|
Verify the image.jpg.zip's integrity.
|
zip -T image.jpg.zip
|
Seek for files bearing the image.jpg name.
|
find . -name image.jpg
|
Search for files modified exactly 30 days ago
|
find . -mtime 30
|
Copy policy.pdf to output and make sure to have permission before deleting old files.
|
cp -i policy.pdf output
|
Archive files presentation.pptx, presentation.pptx, report.pdf into memo.txt.zip, using compression level 6, excluding '*.tmp' files
|
zip -6 -x '*.tmp' memo.txt.zip presentation.pptx presentation.pptx report.pdf
|
Force copy audio.mp3 to output without prompting, preserving attributes, and creating a backup
|
cp -f -p -b audio.mp3 output
|
Move files modified in the last 24 hours from templates to reports_archive
|
find templates -type f -mtime -1 -exec mv {} reports_archive \;
|
Extract the files from script.py.zip by changing the directory to output.
|
unzip -C output script.py.zip
|
Move policy.pdf to logs_archive and yank out the current files with force.
|
cp -f policy.pdf logs_archive
|
Transfer proposal.docx to images_backup and prompt before replacing files
|
cp -i proposal.docx images_backup
|
Unarchive configuration.ini.zip, only extracting files matching pattern '*.pdf', quietly, and verbose output to directory scripts_backup
|
unzip -j -q -v -d scripts_backup configuration.ini.zip '*.pdf'
|
List file sizes in human-readable format
|
ls -h
|
Transfer proposal.docx to reports_archive and interactively confirm overwrite
|
cp -i proposal.docx reports_archive
|
Copy database.sql to images_backup and preserve all attributes
|
cp -a database.sql images_backup
|
Take the files out of proposal.docx.zip. disregarding the directory structure
|
unzip -j proposal.docx.zip
|
Archive report.pdf into new proposal.docx.zip
|
zip -c proposal.docx.zip report.pdf
|
Display photo.png with line numbers
|
cat -n photo.png
|
Show hidden files and directories in a lengthy format with sizes that are readable by humans and full information.
|
ls -alh
|
Unzip files from presentation.pptx.zip quietly
|
unzip -q presentation.pptx.zip
|
Replicate audio.mp3 to temp_folder while retaining its attributes
|
cp -p audio.mp3 temp_folder
|
List the lines that make up report.pdf in the list.
|
cat -n report.pdf
|
In music, prompt before overwriting proposal.docx, regard the destination as a file, and only move if it's more recent.
|
mv -iuT proposal.docx music
|
Extract files from spreadsheet.xlsx.zip into images_backup
|
unzip -d images_backup spreadsheet.xlsx.zip
|
Change directory to projects_backup and extract files from script.py.zip
|
unzip -C projects_backup script.py.zip
|
Show files having output that is colourized.
|
ls -G
|
Unzip files from video.mp4.zip ignoring directory structure
|
unzip -j video.mp4.zip
|
Retrieve script.py encrypted.'*.doc*' as the password for zip
|
unzip -P *.doc* script.py.zip
|
Display file sizes in human-readable form
|
ls -h
|
Show the inode numbers for files.
|
ls -i
|
Extract files from document.docx.zip into archive
|
unzip -d archive document.docx.zip
|
Silently unzip the files from image.jpg.zip.
|
unzip -q image.jpg.zip
|
Ask before replacing database.sql in backups, treat destination as file, and move only if newer
|
mv -iTu database.sql backups
|
Print executable.exe while suppressing the output from the buffer.
|
cat -u executable.exe
|
Show memo.txt with every control character present.
|
cat -A memo.txt
|
List contents of policy.pdf with tabs shown as ^I
|
cat -T policy.pdf
|
Replicate audio.mp3 to temp_folder while retaining its attributes
|
cp -p audio.mp3 temp_folder
|
Move contract.pdf to scripts and print verbose feedback
|
mv -v contract.pdf scripts
|
Without asking, force copy audio.mp3 to archive
|
cp -f audio.mp3 archive
|
Push photo.png firmly into templates, but ask to be asked before overwriting
|
mv -fi photo.png templates
|
Print proposal.docx using the symbol ^ for the tabs.I
|
cat -T proposal.docx
|
Show suppressed buffered output for image.jpg
|
cat -u image.jpg
|
Unprompted overwrite current files when extracting policy.pdf.zip
|
unzip -o policy.pdf.zip
|
Extract encrypted database.sql.zip with password '*.doc*'
|
unzip -P *.doc* database.sql.zip
|
Search for files with names containing 'document' and not writable by the group
|
find . -type f -name "*document*" ! -perm -g=w
|
Decompress video.mp4.zip, extracting files matching pattern '*.csv', quietly, and testing archive integrity only to directory temp_folder
|
unzip -j -q -t -d temp_folder video.mp4.zip '*.csv'
|
List every file, hidden files included.
|
ls -a
|
Provide password '*.py' to extract memo.txt.zip
|
unzip -P *.py memo.txt.zip
|
Unarchive spreadsheet.xlsx.zip, quietly and extracting to standard output to directory temp_folder
|
unzip -q -p -d temp_folder spreadsheet.xlsx.zip
|
Look for metaphorical connections.
|
find . -type l
|
Search for files with name database.sql
|
find . -name database.sql
|
Archive files script.py, executable.exe, video.mp4 into script.py.zip, compressing only '*.txt' files, excluding '*.tmp' files
|
zip -n '*.txt' -x '*.tmp' script.py.zip script.py executable.exe video.mp4
|
Move files to scripts
|
find . -name script.py -execdir mv {} scripts \
|
Display files with colorized output
|
ls -G
|
Make a copy of report.pdf in logs_archive and make a backup of the current files.
|
cp -b report.pdf logs_archive
|
List files one per line
|
ls -1
|
Package files configuration.ini, photo.png, database.sql into document.docx.zip, displaying verbose output, storing file attributes
|
zip -v -X document.docx.zip configuration.ini photo.png database.sql
|
Print inode numbers of files
|
ls -i
|
Prompt before overwriting memo.txt in logs, treating destination as file
|
mv -iT memo.txt logs
|
Replace spreadsheet.xlsx in archives without asking
|
mv -f spreadsheet.xlsx archives
|
Extract spreadsheet.xlsx.zip with password '123pass', preserving permissions, overwriting existing files, and extracting symbolic links to directory music_library
|
unzip -P 123pass -K -o -l -d music_library spreadsheet.xlsx.zip
|
Display the file's inode numbers.
|
ls -i
|
Display file inode numbers
|
ls -i
|
Add and move presentation.pptx to memo.txt.zip
|
zip -m memo.txt.zip presentation.pptx
|
Extract the files from memo.txt.zip without a directory structure.
|
unzip -j memo.txt.zip
|
Extract files from presentation.pptx.zip into temp_folder
|
unzip -d temp_folder presentation.pptx.zip
|
Make executable.exe a new archive.zip including image.jpg
|
zip -c executable.exe.zip image.jpg
|
In image.jpg.zip, add contract.pdf and check for updates.
|
zip -f image.jpg.zip contract.pdf
|
List files sorted by size and modification time with colored output
|
ls -SltG
|
Unarchive image.jpg.zip with password 'secure123' and overwriting existing files to directory videos_backup
|
unzip -P secure123 -o -d videos_backup image.jpg.zip
|
Package files script.py, image.jpg, database.sql into presentation.pptx.zip, using compression level 3, silently
|
zip -3 -q presentation.pptx.zip script.py image.jpg database.sql
|
Files should be listed in the lengthy listing format.
|
ls -l
|
List the files in reverse order based on size and modification time.
|
ls -Sltr
|
Copy video.mp4 to templates_backup while preserving its attributes and creating a hard link
|
cp -p -l video.mp4 templates_backup
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.