Text
stringlengths 16
168
| Code
stringlengths 5
107
|
---|---|
Prior to replacing reports with script.py, ask.
|
mv -i script.py reports
|
Examine what's in image.jpg.zip.
|
unzip -l image.jpg.zip
|
Prompt before overwriting database.sql in downloads, treat destination as file, and display verbose output
|
mv -iTv database.sql downloads
|
Move executable.exe to music without asking to overwrite
|
mv -n executable.exe music
|
Mirror proposal.docx to temp_folder and prompt if files already exist
|
cp -i proposal.docx temp_folder
|
Filter files in databases based on *.exe, then move them to archive
|
grep -lR "*.exe" databases | xargs -I {} mv {} archive
|
Find the usual files.
|
find . -type f
|
Show file sizes in a readable format
|
ls -h
|
Move configuration.ini to templates as a regular file
|
mv -T configuration.ini templates
|
Locate empty directories
|
find . -type d -empty
|
Show the contents of executable.exe with line numbers
|
cat -n executable.exe
|
Make "photos" and purge files that correspond to "*.png".
|
mkdir photos && rm **.png*
|
Clone report.pdf to reports_archive and prompt for permission to overwrite
|
cp -i report.pdf reports_archive
|
Look for files with the name policy.pdf.
|
find . -name policy.pdf
|
In image.jpg.zip, add contract.pdf and check for updates.
|
zip -f image.jpg.zip contract.pdf
|
Include directories first, then files.
|
ls --group-directories-first
|
Display contract.pdf, showing line numbers, non-printing characters, and tabs as '^I', with a '$' at the end of each line
|
cat -n -vT -e contract.pdf
|
Erase spreadsheet.xlsx from policy.pdf.zip
|
zip -d policy.pdf.zip spreadsheet.xlsx
|
See what's in database.sql.zip
|
unzip -l database.sql.zip
|
In executable.exe, update configuration.ini.zip If more recent
|
zip -f executable.exe.zip configuration.ini
|
Prompt for confirmation before moving document.docx to presentations
|
mv -i document.docx presentations
|
Extract the files from memo.txt.zip by navigating to projects_backup.
|
unzip -C projects_backup memo.txt.zip
|
Recursively list subdirectories with detailed information and human-readable sizes
|
ls -Rdlh
|
Don't use presentation.pptx to replace any existing files in backups.
|
mv -n presentation.pptx backups
|
Verbose output should be displayed while extracting audio.mp3.zip.
|
unzip -v audio.mp3.zip
|
Ask before replacing presentation.pptx in videos and treat destination as a file
|
mv -Ti presentation.pptx videos
|
List proposal.docx contents with suppression of repeated empty lines
|
cat -s proposal.docx
|
Search for files modified in the last 30 days and larger than 1GB
|
find . -type f -mtime -30 -size +1G
|
List all files in the current directory
|
ls -a
|
Copy spreadsheet.xlsx to reports_archive and create a backup of existing files
|
cp -b spreadsheet.xlsx reports_archive
|
Package files script.py, spreadsheet.xlsx, contract.pdf into proposal.docx.zip, saving extended attributes, storing file attributes
|
zip -X -X proposal.docx.zip script.py spreadsheet.xlsx contract.pdf
|
Extract files from database.sql.zip into output
|
unzip -d output database.sql.zip
|
Show line numbers for memo.txt
|
cat -n memo.txt
|
Show line numbers for memo.txt
|
cat -n memo.txt
|
Use gzip to compress files.
|
find . -type f -exec gzip {} \
|
silently list the contents of configuration.ini
|
cat -q configuration.ini
|
Search for files owned by the user 'user1' or 'user2'
|
find . -type f \( -user user1 -o -user user2 \)
|
Move files from "databases" to "reports_archive" after creating the directory "databases".
|
mkdir databases && mv databases/* reports_archive
|
Seek for files bearing the contract.pdf name.
|
find . -name contract.pdf
|
List proposal.docx contents with suppression of repeated empty lines
|
cat -s proposal.docx
|
Recursively list subdirectories with detailed information, then search for a specific file
|
ls -Rl | grep "filename"
|
Replicate proposal.docx to output and prompt for user confirmation
|
cp -i proposal.docx output
|
Archive files script.py, memo.txt, database.sql into script.py.zip, displaying verbose output, including empty directories
|
zip -v -r0 script.py.zip script.py memo.txt database.sql
|
Place document.docx in the configuration.ini.zip archive.
|
zip -m configuration.ini.zip document.docx
|
Print memo.txt with tabs represented as ^I
|
cat -T memo.txt
|
Transfer configuration.ini to logs_archive and interactively confirm overwrite while preserving attributes and creating a backup
|
cp -i -p -b configuration.ini logs_archive
|
Transfer reports to scripts_backup with recursive copying, preserving attributes, and creating a backup
|
cp -r -p -b reports scripts_backup
|
Replace reports with video.mp4 only if it's newer or doesn't exist
|
mv -u video.mp4 reports
|
Display configuration.ini with suppressed empty lines
|
cat -s configuration.ini
|
Create the directory "logs" and extract the contents of "presentation.pptx.zip" into it using Zipping.
|
mkdir logs && unzip presentation.pptx.zip -d logs
|
List all files in the current directory with detailed information, then sort by file extension
|
ls -al | awk -F. '{print $NF}' | sort
|
Find files with names containing 'data' and not readable by others
|
find . -type f -name "*data*" ! -perm -o=r
|
Move files from scripts to backup and append timestamp to filename
|
find scripts -type f -exec sh -c 'mv "$1" "$2/$(basename "$1")_$(date +%Y%m%d_%H%M%S)"' sh {} backup \;
|
Move contract.pdf into audio.mp3.zip
|
zip -m audio.mp3.zip contract.pdf
|
Move image.jpg to temp and handle it as a regular file
|
mv -T image.jpg temp
|
If scripts is outdated or nonexistent, only substitute contract.pdf for it.
|
mv -u contract.pdf scripts
|
Look for empty files
|
find . -type f -empty
|
Display hidden directories and files in a lengthy format with output that is coloured.
|
ls -alG
|
Replace databases with spreadsheet.xlsx if it's newer or doesn't exist
|
mv -u spreadsheet.xlsx databases
|
Recursively list subdirectories with detailed information and human-readable sizes
|
ls -Rdlh
|
Make a copy of executable.exe, don't replace it, and output verbosely
|
mv -bnv executable.exe music
|
Show non-printing characters for video.mp4
|
cat -v video.mp4
|
Zip memo.txt ignoring directory structure
|
zip -j configuration.ini.zip memo.txt
|
Recursively list subdirectories
|
ls -R
|
Open configuration.ini and extract encrypted.zip using the "*.txt" password
|
unzip -P *.txt configuration.ini.zip
|
Transfer script.py to photos_backup while keeping all properties intact.
|
cp -a script.py photos_backup
|
Show report.pdf contents with repeated empty lines suppressed
|
cat -s report.pdf
|
Enable colorized output
|
ls -G
|
Include directories first, then files.
|
ls --group-directories-first
|
List subdirectories in a recursive manner with comprehensive details, and then look for a certain file.
|
ls -Rl | grep "filename"
|
Mirror proposal.docx to temp_folder and prompt if files already exist
|
cp -i proposal.docx temp_folder
|
Archive files policy.pdf, proposal.docx, spreadsheet.xlsx into report.pdf.zip, storing symbolic links
|
zip -y report.pdf.zip policy.pdf proposal.docx spreadsheet.xlsx
|
Silently extract the files from contract.pdf.zip.
|
unzip -q contract.pdf.zip
|
Files in contract.pdf.zip are displayed.
|
unzip -l contract.pdf.zip
|
Shift script.py to projects treating it as a non-directory
|
mv -T script.py projects
|
Find files with a size of precisely 50 bytes.
|
find . -size 50c
|
Display characters for spreadsheet.xlsx that aren't printed
|
cat -v spreadsheet.xlsx
|
Find files owned by the user and group *.py
|
find . -type f -user *.py -group *.py
|
Put video.mp4 on silent display.
|
cat -q video.mp4
|
Check database.sql.zip for integrity
|
unzip -t database.sql.zip
|
Copy database.sql to downloads_archive and ask for confirmation from the user
|
cp -i database.sql downloads_archive
|
Transfer the 'presentation.pptx' file to the 'output' directory.
|
cp /presentation.pptx /output/
|
Show hidden files and directories with descriptive text and colourful images.
|
ls -alG
|
Compress files report.pdf, audio.mp3, configuration.ini into audio.mp3.zip, storing symbolic links, silently
|
zip -y -q audio.mp3.zip report.pdf audio.mp3 configuration.ini
|
Look for files modified within the last 7 days
|
find . -mtime -7
|
Delete files with name database.sql
|
find . -name database.sql -delete
|
Show each file on a separate line
|
ls -1
|
Use gzip to compress files.
|
find . -type f -exec gzip {} \
|
Display every character in the control set for spreadsheet.xlsx
|
cat -A spreadsheet.xlsx
|
Forcefully rename image.jpg to presentations
|
mv -f image.jpg presentations
|
List every file with the word "backup" in its name, together with all relevant details.
|
ls -l *backup*
|
Take remove the files from database.sql.zip that provide verbose output.
|
unzip -v database.sql.zip
|
Open audio.mp3.zip, extract the contents, and replace any existing files.
|
unzip -o audio.mp3.zip
|
Delete files with name video.mp4
|
find . -name video.mp4 -delete
|
Display report.pdf with the error messages hidden
|
cat -q report.pdf
|
Show files arranged by modification time
|
ls -t
|
Replicate video.mp4 to backup preserving attributes
|
cp -a video.mp4 backup
|
Look for files modified within the last 7 days
|
find . -mtime -7
|
Move contract.pdf into audio.mp3.zip
|
zip -m audio.mp3.zip contract.pdf
|
Output the first 10 lines of executable.exe
|
cat executable.exe | head
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.