Text
stringlengths 16
168
| Code
stringlengths 5
107
|
---|---|
Clone memo.txt to logs_archive with attribute preservation, creating a hard link, and making a backup | cp -p -l -b memo.txt logs_archive |
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 memo.txt to databases, treating it like any other file. | mv -T memo.txt databases |
Copy contract.pdf to videos_backup while preserving its attributes, creating a hard link, and making a backup | cp -p -l -b contract.pdf videos_backup |
Display executable.exe, showing line numbers, non-printing characters, and tabs as '^I', with a '$' at the end of each line | cat -n -v -T -e executable.exe |
Display characters for executable.exe that aren't printed | cat -v executable.exe |
Show files with colored output | ls -G |
Show files listed in order of modification time | ls -t |
Archive policy.pdf into new audio.mp3.zip | zip -c audio.mp3.zip policy.pdf |
Show files in a format with colour. | ls -G |
Move script.py to downloads, handling it as though it were a regular file. | mv -T script.py downloads |
Show directories before files. | ls --group-directories-first |
Display executable.exe, showing line numbers, non-printing characters, and tabs as spaces | cat -n -vT executable.exe |
List directories first, followed by files | ls --group-directories-first |
Replicate spreadsheet.xlsx to music_library while retaining its attributes, creating a hard link, and making a backup | cp -p -l -b spreadsheet.xlsx music_library |
Release memo.txt.zip, extracting symbolic links and listing files only to directory videos_backup | unzip -l -d videos_backup memo.txt.zip |
Forcefully move script.py to templates, but prompt before overwriting | mv -fi script.py templates |
Show subdirectories recursively | ls -R |
Duplicate executable.exe to output and keep attributes unchanged, creating a hard link, and making a backup | cp -p -l -b executable.exe output |
Files in contract.pdf.zip are displayed. | unzip -l contract.pdf.zip |
Move all files from 'reports' to 'presentations', then create a directory named 'videos' and copy all files from 'presentations' to 'videos'. | mv /reports/* /presentations/ | mkdir /videos/ | cp /presentations/* /videos/ |
Show directory names without contents | ls -d |
Display the names of directories but not their contents. | ls -d |
If executable.exe is more recent, update it in script.py.zip. | zip -f script.py.zip executable.exe |
Extraction of files from report.pdf.zip enabling verbose mode | unzip -v report.pdf.zip |
Package files video.mp4, script.py, video.mp4 into policy.pdf.zip, compressing with best compression | zip -9 policy.pdf.zip video.mp4 script.py video.mp4 |
Replicate document.docx to logs_archive and create backups if files exist | cp -b document.docx logs_archive |
Include hidden files in the list of files. | ls -a |
Display files sorted by size | ls -S |
List the files in descending order of size, show the file sizes in a comprehensible way, and then show the first ten lines. | ls -lSh | head -n 10 |
Move database.sql to projects_backup, then ask to overwrite interactively. | cp -i database.sql projects_backup |
Show files arranged by size | ls -S |
Copy all files from 'videos' to 'presentations', then compress them into a zip file named 'audio.mp3.zip'. | cp /videos/* /presentations/ | zip -r /presentations/audio.mp3.zip /presentations/* |
Clone image.jpg to images_backup with attribute preservation and creating a hard link | cp -p -l image.jpg images_backup |
Copy image.jpg and forcefully replace existing files in music_library | cp -f image.jpg music_library |
Duplicate contract.pdf to documents_archive with user confirmation for overwrite, preserving attributes, and creating a backup | cp -i -p -b contract.pdf documents_archive |
Replicate document.docx to projects_backup with hard links | cp -l document.docx projects_backup |
Request permission before changing photo.png to videos, treat the destination as a file, and provide detailed comments. | mv -TiV photo.png videos |
Change directory to output and extract files from document.docx.zip | unzip -C output document.docx.zip |
Print script.py while preventing the display of several blank lines. | cat -s script.py |
Delete files with name video.mp4 | find . -name video.mp4 -delete |
Arrange files according to when they were last modified, show the file sizes in a legible manner, and then tally the amount of lines. | ls -lt | awk '{print $5}' | wc -l |
Show executable.exe as ^ with tabsI | cat -T executable.exe |
Update existing files in database.sql.zip | zip -u database.sql.zip proposal.docx |
Show image.jpg with suppressed buffered output | cat -u image.jpg |
See what's in image.jpg.zip | unzip -l image.jpg.zip |
Display report.pdf with the error messages hidden | cat -q report.pdf |
Without asking, make a backup, and force copy executable.exe to videos_backup while maintaining attributes | cp -f -p -b executable.exe videos_backup |
Transfer image.jpg to archives, making any necessary destination overwrites. | mv -f image.jpg archives |
When zipping, disregard paths proposal.docx. | zip -j video.mp4.zip proposal.docx |
Search for files with names containing 'backup' and created in the last 7 days | find . -type f -name "*backup*" -ctime -7 |
Find files with names starting with 'log' and modified in the last 24 hours | find . -type f -name "log*" -mtime -1 |
Release photo.png.zip, excluding archive.zip, verbose output, and extracting symbolic links to directory output | unzip -x archive.zip -v -l -d output photo.png.zip |
Show hidden files and directories in long format with colored output and detailed information | ls -alG |
Before forcibly transferring spreadsheet.xlsx to backups, make a backup of it. | mv -bf spreadsheet.xlsx backups |
Show each file separately, one on a line. | ls -1 |
Using attribute preservation, clone video.mp4 to temp_folder, establish a hard link, and create a backup | cp -p -l -b video.mp4 temp_folder |
List the files in reverse order based on size and modification time. | ls -Sltr |
Files from memo.txt.zip should be extracted into reports_archive. | unzip -d reports_archive memo.txt.zip |
Unarchive video.mp4.zip, overwriting existing files, to directory photos_backup | unzip -o -d photos_backup video.mp4.zip |
Treat the destination as a file, prompt before overwriting database.sql in temp, and print verbose information. | mv -iTv database.sql temp |
Search for files named report.pdf | find . -name report.pdf |
Display files sorted by modification time in reverse order | ls -ltr |
Transfer executable.exe to photos_backup and interactively confirm overwrite while preserving attributes | cp -i -p executable.exe photos_backup |
Enumerate file sizes in a human-readable format. | ls -h |
Provide password '*.txt' to extract proposal.docx.zip | unzip -P *.txt proposal.docx.zip |
List each line ending in image.jpg in the contents. | cat -E image.jpg |
Move document.docx to logs_archive, and if the files are already there, create a backup. | cp -b -i document.docx logs_archive |
Make a hard link, backup, and duplicate executable.exe to projects_backup while maintaining all attributes. | cp -p -l -b executable.exe projects_backup |
Replicate memo.txt to videos_backup while retaining its attributes and creating a hard link | cp -p -l memo.txt videos_backup |
If the parent directories and directory documents don't already exist, create them. | mkdir -p documents |
Verify proposal.docx.zip's integrity. | unzip -t proposal.docx.zip |
Copy images in its entirety, including all subdirectories, to archive. | cp -r images archive |
Print database.sql contents with line numbering | cat -n database.sql |
Folders within Zip archives | zip -r archives archives |
Print executable.exe contents with line endings | cat -E executable.exe |
Extract only updated files from configuration.ini.zip | unzip -U configuration.ini.zip |
Extract the files from script.py.zip by changing the directory to output. | unzip -C output script.py.zip |
Display files sorted by size | ls -S |
Force copy database.sql to documents_backup without prompting | cp -f database.sql documents_backup |
Show only the names of the directories; show nothing inside. | ls -d |
Assume destination is a file, move only if it's newer, and ask before replacing proposal.docx in images. | mv -iTu proposal.docx images |
Take the files out of video.mp4.into archive using zip | unzip -d archive video.mp4.zip |
Display files with extended information | ls -l |
Without asking, make a backup, and force copy audio.mp3 to reports_archive while maintaining attributes | cp -f -p -b audio.mp3 reports_archive |
Move policy.pdf to databases without overwriting | mv -n policy.pdf databases |
Zip files proposal.docx, database.sql, memo.txt into report.pdf.zip, storing file attributes, displaying verbose output | zip -X -v report.pdf.zip proposal.docx database.sql memo.txt |
Look for files under 100 KB in size. | find . -size -100k |
Treat the destination as a file, prompt before overwriting executable.exe in photos, and print verbose information. | mv -iTv executable.exe photos |
Copy image.jpg to logs_archive, making a backup copy of the current files. | cp -b -p image.jpg logs_archive |
Show colored output | ls -G |
Copy files from presentations to music_library and remove them from source | rsync -av --remove-source-files presentations/ music_library |
To documents_archive, copy logs. recursively | cp -r logs documents_archive |
Display presentation.pptx with the error messages hidden | cat -q presentation.pptx |
Print each file separately | ls -1 |
Disentangle policy.pdf.zip, excluding exclude.mp4, to directory images_backup | unzip -x exclude.mp4 -d images_backup policy.pdf.zip |
Print the contents of database.sql with non-blank line numbering. | cat -b database.sql |
Show line endings for executable.exe | cat -E executable.exe |
If executable.exe is more recent, update it in script.py.zip. | zip -f script.py.zip executable.exe |
List contents of policy.pdf with tabs shown as ^I | cat -T policy.pdf |