Text,Code | |
Copy contract.pdf to videos_backup; interactive confirmation is necessary.,cp -i contract.pdf videos_backup | |
Look for directories., find . -type d | |
Files should be sorted with human-readable sizes in reverse order based on size and modification time.,ls -Sltrh | |
Create zip of backups and its contents, zip -r backups backups | |
Look for empty files, find . -type f -empty | |
"List all the contents in a directory, including any hidden files.",ls -a | |
Take files out of executable.exe.zip and replace any files that already exist., unzip -o executable.exe.zip | |
"Extract spreadsheet.xlsx.zip, verbose output, to directory downloads_archive",unzip -v -d downloads_archive spreadsheet.xlsx.zip | |
Display directories at the top of the list,ls --group-directories-first | |
Show configuration.ini with every control character present., cat -A configuration.ini | |
Display database.sql with non-printing characters, cat -v database.sql | |
"Transfer memo.txt to databases, treating it like any other file.",mv -T memo.txt databases | |
Mirror documents to templates_backup recursively, cp -r documents templates_backup | |
"Move image.jpg to documents with force, prompt for confirmation, and move only if newer",mv -ifu image.jpg documents | |
Extract files from executable.exe.zip and switch to music_library, unzip -C music_library executable.exe.zip | |
Print configuration.ini with non-printing characters visible, cat -v configuration.ini | |
"List all files in long format whose names begin with ""file"" recursively.",ls -lR file* | |
Display video.mp4 with all control characters, cat -A video.mp4 | |
Transfer document.docx to images and see the output in verbose,mv -v document.docx images | |
Find directories with names starting with 'project' and not modified in the last 90 days,"find . -type d -name ""project*"" -mtime +90" | |
"Before overwriting, move proposal.docx to logs and prompt.",mv -i proposal.docx logs | |
Display all files and directories recursively,ls -R | |
Check for updates and add presentation.pptx to proposal.docx.zip, zip -u proposal.docx.zip presentation.pptx | |
"Move script.py to downloads, handling it as though it were a regular file.",mv -T script.py downloads | |
Show buffered output suppressed for document.docx, cat -u document.docx | |
Display hidden files and directories with extensive information in a lengthy manner.,ls -al | |
Provide password '*.pdf' to extract configuration.ini.zip, unzip -P *.pdf configuration.ini.zip | |
Display the line counts for memo.txt, cat -n memo.txt | |
Prompt before overwriting script.py in videos_backup, cp -i script.py videos_backup | |
List the contents of presentation.pptx while suppressing the repetitive blank lines., cat -s presentation.pptx | |
Find the report.pdf files., find . -name report.pdf | |
Sort files alphabetically backwards,ls -r | |
"Create a directory named 'scripts', copy all files from 'scripts' to it, then move them to 'documents_archive'.",mkdir /scripts/ | cp /scripts/* /scripts/ | mv /scripts/* /documents_archive/ | |
"Save a backup of memo.txt, do not overwrite, show verbose feedback, and treat destination as file",mv -nbvT memo.txt videos | |
Move the files listed in images to videos_backup. maintaining the directory structure,find images -type f -exec mv -t videos_backup -- {} + | |
Copy document.docx to output while preserving its attributes, cp -p document.docx output | |
List files in order of last modification time,ls -t | |
Verify integrity of spreadsheet.xlsx.zip, unzip -t spreadsheet.xlsx.zip | |
Extract proposal.docx.zip's non-pathable files., unzip -j proposal.docx.zip | |
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 containing 'report' and not writable by others,"find . -type f -name ""*report*"" ! -perm -o=w" | |
Show configuration.ini with error messages suppressed, cat -q configuration.ini | |
Copy executable.exe to documents_archive and prompt before overwriting if necessary,cp --interactive executable.exe documents_archive | |
Display each file on its own line,ls -1 | |
"Files are sorted by size, file sizes are shown in a format that is understandable by humans, and the final five lines are shown.",ls -lSh | tail -n 5 | |
Look for empty files, find . -type f -empty | |
Look for files that are no larger than 1GB or 2GB., find . -size +1G -size -2G | |
Show policy.pdf contents with repeated empty lines suppressed, cat -s policy.pdf | |
Clone database.sql with preserving attributes to temp_folder, cp -p database.sql temp_folder | |
"To images, copy the files.", find . -name script.py -exec cp {} images \ | |
"Sort the files by modification time and list all names that finish in "".mp4"".",ls -t *.mp4 | |
Test image.jpg.zip for corruption, zip -T image.jpg.zip | |
Print memo.txt contents with non-blank line numbering, cat -b memo.txt | |
Change permissions of files, find . -type f -exec chmod 644 {} \ | |
Print report.pdf with suppression of repeated empty lines, cat -s report.pdf | |
Mirror photos_backup to scripts recursively, cp -r scripts photos_backup | |
"List all files in the current directory with detailed information, then extract only the file names",ls -al | awk '{print $9}' | |
Modify the file permissions, find . -type f -execdir chmod 644 {} \ | |
Clone report.pdf to reports_archive and prompt for permission to overwrite, cp -i report.pdf reports_archive | |
Display contents of a directory recursively,ls -R | |
Place contract.pdf inside of the archive spreadsheet.xlsx.Zip, zip -u spreadsheet.xlsx.zip contract.pdf | |
"Move document.docx to archives, overwriting the destination if necessary",mv -f document.docx archives | |
Transfer script.py to photos_backup while keeping all properties intact.,cp -a script.py photos_backup | |
Organise files according to when they were last modified and provide file sizes in a legible manner.,ls -ltSh | |
"Archive files policy.pdf, photo.png, image.jpg into image.jpg.zip, compressing only '*.txt' files, storing symbolic links",zip -n '*.txt' -y image.jpg.zip policy.pdf photo.png image.jpg | |
"Zip files report.pdf, presentation.pptx, photo.png into video.mp4.zip, using compression level 3",zip -3 video.mp4.zip report.pdf presentation.pptx photo.png | |
"Extract document.docx.zip with password 'newpass123', extracting files matching pattern '*.txt', quietly, and testing archive integrity only to directory scripts_backup",unzip -P newpass123 -j -q -t -d scripts_backup document.docx.zip '*.txt' | |
Look for files that are no larger than 1GB or 2GB., find . -size +1G -size -2G | |
Transfer the 'presentation.pptx' file to the 'output' directory.,cp /presentation.pptx /output/ | |
"List files having coloured output, sorted in reverse order by size and modification time.",ls -SltrG | |
"After displaying hidden files and folders in extended format, just the permissions are visible.",ls -al | awk '{print $1}' | |
Backup current files and mirror document.docx to templates_backup., cp -b -p document.docx templates_backup | |
Talkative: memo.txt should be moved to templates.,mv -v memo.txt templates | |
Show non-blank line numbers for proposal.docx, cat -b proposal.docx | |
Replace outdated files from video.mp4.zip with the most recent ones., unzip -U video.mp4.zip | |
"Concatenate document.docx and document.docx, numbering all output lines and showing non-printing characters",cat -n -v document.docx document.docx | |
"Zip files presentation.pptx, executable.exe, photo.png into audio.mp3.zip, compressing with best compression, excluding '*.log' files",zip -9 -x '*.log' audio.mp3.zip presentation.pptx executable.exe photo.png | |
List file sizes in a format suitable for humans,ls -h | |
Show executable.exe with line numbers that aren't blank., cat -b executable.exe | |
Duplicate proposal.docx to photos_backup with user confirmation for overwrite, cp -i proposal.docx photos_backup | |
Check for corruption with configuration.ini.zip., zip -T configuration.ini.zip | |
Copy document.docx to photos_backup and backup existing files, cp -b -p document.docx photos_backup | |
"Recursive copying is used to move music to documents_archive, maintaining attributes, and making a backup.", cp -r -p -b music documents_archive | |
Provide password '*.txt' to extract proposal.docx.zip, unzip -P *.txt proposal.docx.zip | |
Display presentation.pptx with line endings, cat -E presentation.pptx | |
Move video.mp4 to images_backup and force overwrite it., cp -f video.mp4 images_backup | |
"Before replacing executable.exe in temp, prompt, treating destination as file",mv -iT executable.exe temp | |
Delete files with name presentation.pptx, find . -name presentation.pptx -execdir rm {} \ | |
Extract encrypted database.sql.zip with password '*.doc*', unzip -P *.doc* database.sql.zip | |
"Make directory ""projects"" and unzip contents of ""executable.exe.zip"" into it.",mkdir projects && unzip executable.exe.zip -d projects | |
Replicate memo.txt to videos_backup while retaining its attributes and creating a hard link, cp -p -l memo.txt videos_backup | |
Place video.mp4 inside of database.sql.zip, zip -u database.sql.zip video.mp4 | |
List directory contents including hidden files and directories,ls -a | |
"Zip files configuration.ini, proposal.docx, policy.pdf into memo.txt.zip, displaying verbose output",zip -v memo.txt.zip configuration.ini proposal.docx policy.pdf | |
Files should be sorted by size.,ls -S | |
Display the line ends for spreadsheet.xlsx, cat -E spreadsheet.xlsx | |
Verbose output should be displayed while extracting audio.mp3.zip., unzip -v audio.mp3.zip | |
Backup downloads to backup and preserve directory structure, cp -r downloads backup | |
Show report.pdf with characters that don't print, cat -v report.pdf | |
Shift script.py to projects treating it as a non-directory,mv -T script.py projects | |
"If the parent directories do not already exist, create the directory scripts with verbose output.",mkdir -v -p scripts | |
Extract the files from memo.txt.zip by navigating to projects_backup., unzip -C projects_backup memo.txt.zip | |
Move image.jpg to temp and handle it as a regular file,mv -T image.jpg temp | |
Transfer executable.exe to images_backup and establish a hard link, cp -l executable.exe images_backup | |
Show suppressed buffered output for configuration.ini, cat -u configuration.ini | |
Make executable.exe a new archive.zip including image.jpg, zip -c executable.exe.zip image.jpg | |
"Create a directory named 'photos', copy all files from 'music' to it, then move them to 'presentations', and finally find files matching the pattern '*.sql'.","mkdir /photos/ | cp /music/* /photos/ | mv /photos/* /presentations/ | find /presentations/ -name ""*.*.sql""" | |
Search for files with names starting with 'file' and not modified in the last 7 days,"find . -type f -name ""file*"" -mtime +7" | |
"Transfer memo.txt to databases, treating it like any other file.",mv -T memo.txt databases | |
"List the files, one for each line.",ls -1 | |
Display directories listed before files,ls --group-directories-first | |
Ask before replacing presentation.pptx in videos and treat destination as a file,mv -Ti presentation.pptx videos | |
Examine policy.pdf.zip for mistakes., zip -T policy.pdf.zip | |
"When transferring to archives, avoid overwriting executable.exe.",mv -n executable.exe archives | |
Search for files modified exactly 30 days ago, find . -mtime 30 | |
Verbose mode: Transfer image.jpg to backups,mv -v image.jpg backups | |
Make a backup of the current files and copy configuration.ini to reports_archive., cp -b -p configuration.ini reports_archive | |
Transfer document.docx to images and see the output in verbose,mv -v document.docx images | |
Prompt for confirmation before moving document.docx to presentations,mv -i document.docx presentations | |
Extract and update files with newer versions from presentation.pptx.zip, unzip -U presentation.pptx.zip | |
Pack databases and all its files into archive, zip -r databases databases | |
Retrieve script.py encrypted.'*.doc*' as the password for zip, unzip -P *.doc* script.py.zip | |
First-listed show directories,ls --group-directories-first | |
Copy memo.txt to temp_folder while preserving its attributes and creating a hard link, cp -p -l memo.txt temp_folder | |
Print the contents of policy.pdf with line ends., cat -E policy.pdf | |
Update existing files in image.jpg.zip, zip -u image.jpg.zip proposal.docx | |
List the contents of script.py using the ^tabsI, cat -T script.py | |
Create a hard link and replicate image.jpg to output while preserving its properties., cp -p -l image.jpg output | |
Copy database.sql to documents_backup and prompt before overwriting if necessary,cp --interactive database.sql documents_backup | |
Transfer executable.exe to photos_backup and interactively confirm overwrite while preserving attributes, cp -i -p executable.exe photos_backup | |
"Concatenate video.mp4 and presentation.pptx, numbering non-empty output lines",cat -b video.mp4 presentation.pptx | |
Find files with names containing 'data' and modified more than 30 days ago,"find . -type f -name ""*data*"" -mtime +30" | |
"Move document.docx to logs_archive, and if the files are already there, create a backup.", cp -b -i document.docx logs_archive | |
"List files having coloured output, sorted in reverse order by size and modification time.",ls -SltrG | |
Files should be shown sorted by modification time.,ls -t | |
List contents of script.py with non-blank line numbers, cat -b script.py | |
Look for files that are no larger than 1GB or 2GB., find . -size +1G -size -2G | |
Files should be shown in reverse sorted order.,ls -r | |
Look for files that have the name report.pdf., find . -name report.pdf | |
List proposal.docx contents with suppression of repeated empty lines, cat -s proposal.docx | |
Extract video.mp4.zip without displaying output, unzip -q video.mp4.zip | |
Mirror executable.exe with properties preserved to temp_folder,cp -a executable.exe temp_folder | |
"Create a ""templates"" directory and list the files within it.",mkdir templates && cp templates/* output | |
"Replicate executable.exe to templates_backup while retaining its attributes, creating a hard link, and making a backup", cp -p -l -b executable.exe templates_backup | |
Output the first 30 lines of proposal.docx,cat proposal.docx | head -n 30 | |
"Make a hard link, backup, and duplicate photo.png to scripts_backup while maintaining all attributes.", cp -p -l -b photo.png scripts_backup | |
Print configuration.ini without error messages, cat -q configuration.ini | |
Update database.sql in proposal.docx.zip if newer, zip -f proposal.docx.zip database.sql | |
Show directories listed first,ls --group-directories-first | |
Move presentation.pptx to archives without replacing,mv -n presentation.pptx archives | |
Display the contents of report.pdf,cat report.pdf | |
"Unarchive spreadsheet.xlsx.zip, quietly and extracting to standard output to directory temp_folder",unzip -q -p -d temp_folder spreadsheet.xlsx.zip | |
"Move audio.mp3 to templates with force, prompt for confirmation, and move only if newer",mv -ifu audio.mp3 templates | |
Make a backup of the current files and copy proposal.docx to logs_archive.,cp -b proposal.docx logs_archive | |
Change directory to projects_backup and extract files from script.py.zip, unzip -C projects_backup script.py.zip | |
Backup executable.exe before forcefully moving it to downloads,mv -bf executable.exe downloads | |
List each line ending in proposal.docx in the contents., cat -E proposal.docx | |
Test presentation.pptx.zip for errors, unzip -t presentation.pptx.zip | |
"Forcefully move document.docx to templates, but prompt before overwriting",mv -fi document.docx templates | |
Sort files by size,ls -S | |
"Create a directory named ""projects"" and list the files in it.",mkdir projects && ls projects | |
List the contents of document.docx while suppressing buffered output., cat -u document.docx | |
"For each file name, create a backup, a hard link, and mirror it to the destination directory while preserving its properties.", cp -p -l -b database.sql photos_backup | |
Move script.py to documents and replace existing files,mv -f script.py documents | |
"Free document.docx.zip, listing files only, to directory downloads_archive",unzip -l -d downloads_archive document.docx.zip | |
Clone database.sql to music_library and backup existing files, cp -b -p database.sql music_library | |
"From memo.txt.zip, remove presentation.pptx.", zip -d memo.txt.zip presentation.pptx | |
"Display presentation.pptx, showing the dollar at the end of each line",cat -e presentation.pptx | |
Transfer backups to temp_folder with recursive copying, cp -r backups temp_folder | |
"Mirror proposal.docx to videos_backup with attributes intact, creating a hard link, and making a backup", cp -p -l -b proposal.docx videos_backup | |
Extract files from photos.zip matching *.py and move to logs_archive,"tar -cvf - -C photos.zip . | tar xvf - -C logs_archive --wildcards ""*.py""" | |
List contents of photo.png with line numbers, cat -n photo.png | |
"Display spreadsheet.xlsx, showing tabs as '^I'",cat -T spreadsheet.xlsx | |
Move memo.txt to the backup and perform a force overwrite there., cp -f memo.txt backup | |
"Copy images in its entirety, including all subdirectories, to archive.", cp -r images archive | |
Files in report.pdf.zip are shown., unzip -l report.pdf.zip | |
Copy files to reports, find . -name presentation.pptx -exec cp {} reports \ | |
"Transfer spreadsheet.xlsx to logs, then output detailed comments.",mv -v spreadsheet.xlsx logs | |
Find files named spreadsheet.xlsx, find . -name spreadsheet.xlsx | |
Find the report.pdf files., find . -name report.pdf | |
"Create a backup of policy.pdf, do not overwrite, and display verbose output",mv -bnv policy.pdf videos | |
"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 | |
Examine configuration.ini.zip for mistakes., zip -T configuration.ini.zip | |
Sort files by modification time and display file sizes in human-readable format,ls -ltSh | |
"Enumerate all files, even hidden ones, with the word ""log"" in their names.",ls -a *log* | |
Unzip files from proposal.docx.zip ignoring directory structure, unzip -j proposal.docx.zip | |
Display audio.mp3 with line endings, cat -E audio.mp3 | |
"Before overwriting, move proposal.docx to logs and prompt.",mv -i proposal.docx logs | |
Zip proposal.docx without any folder organization, zip -j configuration.ini.zip proposal.docx | |
"Move audio.mp3 to reports with force, prompt for confirmation, and treat destination as file",mv -ifT audio.mp3 reports | |
"If spreadsheet.xlsx is more recent or does not already exist in documents, move it there.",mv -u spreadsheet.xlsx documents | |
"If spreadsheet.xlsx is more recent or does not already exist in documents, move it there.",mv -u spreadsheet.xlsx documents | |
"Move music to archive, making a backup of all currently stored files.", cp -b -r music archive | |
Display detailed information about files,ls -l | |
"Make a hard link, backup, and copy spreadsheet.xlsx to photos_backup while maintaining its properties.", cp -p -l -b spreadsheet.xlsx photos_backup | |
"Clone policy.pdf to music_library with attribute preservation, creating a hard link, and making a backup", cp -p -l -b policy.pdf music_library | |
Extract database.sql.zip with no password to directory projects_backup,unzip -d projects_backup database.sql.zip | |
Overwrite existing files in projects with policy.pdf,mv -f policy.pdf projects | |
List files with each on a new line,ls -1 | |
"Unpack configuration.ini.zip, verbose output, excluding backup_old2.docx, and testing archive integrity only to directory templates_backup",unzip -v -x backup_old2.docx -t -d templates_backup configuration.ini.zip | |
Show the file's inode numbers.,ls -i | |
Remove presentation.pptx from proposal.docx.zip, zip -d proposal.docx.zip presentation.pptx | |
Find the usual files., find . -type f | |
Files should be sorted descendingly.,ls -r | |
Fill executable.exe with audio.mp3.zip, zip -c executable.exe.zip audio.mp3 | |
Avoid replacing executable.exe with an already-existing file in images.,mv -n executable.exe images | |
Move database.sql to report.pdf.zip and add it., zip -m report.pdf.zip database.sql | |
Make backup copies of database.sql and duplicate it to backup.,cp -b database.sql backup | |
Verbose output should be displayed while extracting contract.pdf.zip., unzip -v contract.pdf.zip | |
Output the first 100 lines of video.mp4,cat video.mp4 | head -n 100 | |
Look for files exactly 50 bytes in size, find . -size 50c | |
Check database.sql.zip to maintain integrity, zip -T database.sql.zip | |
Output the first 25 lines of configuration.ini,cat configuration.ini | head -n 25 | |
Zip memo.txt without directory structure, zip -j audio.mp3.zip memo.txt | |
"Concatenate script.py and database.sql, numbering non-empty output lines and showing non-printing characters",cat -b -v script.py database.sql | |
Sort files by the date they were last modified.,ls -t | |
List files in memo.txt.zip, unzip -l memo.txt.zip | |
Display directories without a content list.,ls -d | |
Make a copy of document.docx in projects_backup and forcefully replace any existing files., cp -f document.docx projects_backup | |
Show files arranged by size,ls -S | |
Extract files silently from spreadsheet.xlsx.zip, unzip -q spreadsheet.xlsx.zip | |
"Transfer all of the files from ""databases"" to ""reports,"" then zip them all together into a file called ""file_name].zip.""",cp /databases/* /reports/ | zip -r /reports/script.py.zip /reports/* | |
List the contents of image.jpg.zip., unzip -l image.jpg.zip | |
Ask before overwriting backups with image.jpg,mv -i image.jpg backups | |
Subdirectories are listed recursively,ls -R | |
"Display hidden files and directories in long format, then count the number of lines",ls -al | wc -l | |
Use hard linking to clone script.py to music_library, cp -l script.py music_library | |
Create a new script.py by archiving report.pdf.zip, zip -c script.py.zip report.pdf | |
"Prior to replacing reports with script.py, ask.",mv -i script.py reports | |
Prompt before overwriting script.py in videos_backup, cp -i script.py videos_backup | |
Make a hard link duplicate of executable.exe in images_backup., cp -l executable.exe images_backup | |
"Archive files audio.mp3, presentation.pptx, audio.mp3 into proposal.docx.zip, using password 'pass123', verbose output",zip -P pass123 -v proposal.docx.zip audio.mp3 presentation.pptx audio.mp3 | |
Create new archive policy.pdf.zip from contract.pdf, zip -c policy.pdf.zip contract.pdf | |
"Transfer all of the files from ""databases"" to ""reports,"" then zip them all together into a file called ""file_name].zip.""",cp /databases/* /reports/ | zip -r /reports/script.py.zip /reports/* | |
Transfer temp and its contents to logs_archive recursively, cp -r temp logs_archive | |
Overwrite files without prompting when extracting memo.txt.zip, unzip -o memo.txt.zip | |
Display files sorted by modification time in reverse order,ls -ltr | |
Look for files modified within the last 7 days, find . -mtime -7 | |
"Create a backup of video.mp4, do not overwrite, and move only if newer",mv -bnu video.mp4 documents | |
Put script.py on silent display., cat -q script.py | |
Search for files modified exactly 30 days ago, find . -mtime 30 | |
Show files listed in reverse order,ls -r | |
Delete files with name document.docx, find . -name document.docx -exec rm {} \ | |
"Open audio.mp3.zip, extract the contents, and replace any existing files.", unzip -o audio.mp3.zip | |
Files should be listed in the lengthy listing format.,ls -l | |
Add and move document.docx to video.mp4.zip, zip -m video.mp4.zip document.docx | |
"Extract report.pdf.zip, only extracting files matching pattern '*.txt', to directory scripts_backup",unzip -j -d scripts_backup report.pdf.zip '*.txt' | |
Make a backup of the current files and copy memo.txt to downloads_archive.,cp -b memo.txt downloads_archive | |
Move the files listed in images to videos_backup. maintaining the directory structure,find images -type f -exec mv -t videos_backup -- {} + | |
Check for updates and add proposal.docx to presentation.pptx.zip, zip -u presentation.pptx.zip proposal.docx | |
"Transfer spreadsheet.xlsx to projects, replacing any files that are already there.",mv -f spreadsheet.xlsx projects | |
Present file sizes in an easily readable way.,ls -h | |
Display detailed information: Move script.py to scripts,mv -v script.py scripts | |
"Move the files to documents_archive from documents, then delete them from the source.",rsync -av --remove-source-files documents/ documents_archive | |
Modify the file permissions, find . -type f -exec chmod 644 {} \ | |
Show line endings for executable.exe, cat -E executable.exe | |
Provide password '*.sql' to extract presentation.pptx.zip, unzip -P *.sql presentation.pptx.zip | |
"Show directories themselves with detailed information, then list the number of files in each directory",ls -ld */ | xargs -I {} sh -c 'echo {}; ls -l {} | wc -l' | |
Verbose output should be displayed while extracting photo.png.zip., unzip -v photo.png.zip | |
Make executable.exe a new archive.zip including image.jpg, zip -c executable.exe.zip image.jpg | |
Mirror contract.pdf to images_backup and replace any files that already exist without authorization, cp -f contract.pdf images_backup | |
Show image.jpg with suppressed buffered output, cat -u image.jpg | |
Print presentation.pptx contents with line numbering, cat -n presentation.pptx | |
Zip contract.pdf without any folder organization, zip -j script.py.zip contract.pdf | |
Making a hard link and mirroring presentation.pptx to scripts_backup while preserving properties, cp -p -l presentation.pptx scripts_backup | |
List directories without their contents,ls -d | |
List files in long format with colored output,ls -lG | |
Put script.py in the designated directory. thinking about it as a file rather than a directory,mv -T script.py temp | |
Overwrite existing files in projects with policy.pdf,mv -f policy.pdf projects | |
Incorporate report.pdf into document.docx.zip then remove, zip -m document.docx.zip report.pdf | |
Show hidden files and directories,ls -a | |
Place document.docx in the configuration.ini.zip archive., zip -m configuration.ini.zip document.docx | |
Check report.pdf.zip for errors, unzip -t report.pdf.zip | |
"Transfer report.pdf to downloads_archive and, if required, prompt before overwriting",cp --interactive report.pdf downloads_archive | |
Files from memo.txt.zip should be extracted into reports_archive., unzip -d reports_archive memo.txt.zip | |
Duplicate photo.png to logs_archive and create backup copies,cp -b photo.png logs_archive | |
Pack document.docx into photo.png.zip, zip -c photo.png.zip document.docx | |
Show presentation.pptx with line numbers that aren't blank., cat -b presentation.pptx | |
Display files sorted by last modified time,ls -t | |
"Unpack proposal.docx.zip, preserving permissions, overwriting existing files, and only extracting files matching pattern '*.pdf' to directory documents_archive",unzip -K -o -j -d documents_archive proposal.docx.zip '*.pdf' | |
Files should be shown sorted by last modification time.,ls -t | |
Find files modified within the last 7 days,find . -type f -mtime -7 | |
Create a hard link by moving configuration.ini to documents_archive., cp -l configuration.ini documents_archive | |
Display presentation.pptx with the error messages hidden, cat -q presentation.pptx | |
Duplicate configuration.ini to scripts_backup with a backup if files exist, cp -b -i configuration.ini scripts_backup | |
Recursively compress backups, zip -r backups backups | |
Create a backup by recursively copying images to images_backup while preserving its properties., cp -r -p -b images images_backup | |
Place document.docx.zip inside report.pdf., zip -m document.docx.zip report.pdf | |
"Display policy.pdf, showing line numbers, non-printing characters, and tabs as spaces, with a '$' at the end of each line",cat -n -vT -e policy.pdf | |
"Display spreadsheet.xlsx, showing tabs as '^I'",cat -T spreadsheet.xlsx | |
"Zip files configuration.ini, presentation.pptx, spreadsheet.xlsx into executable.exe.zip, using password 'pass123', excluding '*.tmp' files",zip -P pass123 -x '*.tmp' executable.exe.zip configuration.ini presentation.pptx spreadsheet.xlsx | |
Update existing files with newer versions from audio.mp3.zip, unzip -U audio.mp3.zip | |
Clone report.pdf to reports_archive with attribute preservation and creating a hard link, cp -p -l report.pdf reports_archive | |
List each line ending in image.jpg in the contents., cat -E image.jpg | |
Show hidden files and directories in long format with colored output,ls -alG | |
Extract encrypted photo.png.zip with password '*.pdf', unzip -P *.pdf photo.png.zip | |
Print database.sql contents with line numbering, cat -n database.sql | |
Verify presentation.pptx.zip for integrity, zip -T presentation.pptx.zip | |
Decompress script.py.zip with password 'password123' to directory scripts_backup,unzip -P password123 -d scripts_backup script.py.zip | |
Search for files between 1GB and 2GB in size, find . -size +1G -size -2G | |
"Unzip the contents of ""database.sql"" into the directory ""music"" that has been created.",mkdir music && unzip database.sql.zip -d music | |
Create a new archive using photo.png and database.sql.zip., zip -c database.sql.zip photo.png | |
Create directory downloads and parent directories if they do not exist with verbose output,mkdir -p -v downloads | |
Search for files modified in the last 24 hours and larger than 100KB,find . -type f -mtime -1 -size +100k | |
Show the names of the directories rather than their contents.,ls -d | |
Show all control characters for audio.mp3, cat -A audio.mp3 | |
Show hidden files with regular files.,ls -a | |
Create a hard link and replicate video.mp4 to archive while preserving its properties., cp -p -l video.mp4 archive | |
Move script.py with properties preserved to documents_archive,cp -a script.py documents_archive | |
Show non-blank line numbers for spreadsheet.xlsx, cat -b spreadsheet.xlsx | |
"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 | |
Sort files based on modification time,ls -t | |
List files sorted by time of modification,ls -t | |
Unpack policy.pdf.zip with password 'pass123' and preserving permissions to directory scripts_backup,unzip -P pass123 -K -d scripts_backup policy.pdf.zip | |
Extract the files from policy.pdf.zip by changing the directory to projects_backup., unzip -C projects_backup policy.pdf.zip | |
Show line numbers for database.sql that are not blank., cat -b database.sql | |
List the contents of report.pdf while suppressing the repetitive blank lines., cat -s report.pdf | |
Move the files to scripts_backup after searching templates for *.ini.,"grep -rl ""*.ini"" templates | xargs -I {} mv {} scripts_backup" | |
Shift script.py to projects treating it as a non-directory,mv -T script.py projects | |
"Display proposal.docx, showing line numbers and non-printing characters, with a '$' at the end of each line",cat -n -v -e proposal.docx | |
"Unpack executable.exe.zip, preserving permissions, to directory documents_backup",unzip -K -d documents_backup executable.exe.zip | |
"Display hidden files and directories in long format, then remove the owner information","ls -al | awk '{$2=$3=$4=""""; print $0}'" | |
Verbose result: proposal.docx should be moved to templates.,mv -v proposal.docx templates | |
Duplicate presentation.pptx to downloads_archive and force replacement, cp -f presentation.pptx downloads_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 | |
"List all the contents in a directory, including any hidden files.",ls -a | |
Verbose output should be displayed while extracting contract.pdf.zip., unzip -v contract.pdf.zip | |
"If files already exist, duplicate spreadsheet.xlsx to projects_backup using a backup.", cp -b -i spreadsheet.xlsx projects_backup | |
Show all control characters for audio.mp3, cat -A audio.mp3 | |
Extract files silently from spreadsheet.xlsx.zip, unzip -q spreadsheet.xlsx.zip | |
Copy report.pdf to videos_backup and prompt before overwriting if necessary,cp -i report.pdf videos_backup | |
Provide a complete informational list of every file in the current directory.,ls -al | |
Create directory databases with verbose output,mkdir -v databases | |
Print the contents of policy.pdf with line ends., cat -E policy.pdf | |
Locate files modified more than 1 year ago, find . -mtime +365 | |
Files from configuration.ini.zip should be extracted into documents_backup., unzip -d documents_backup configuration.ini.zip | |
Find directories modified more than 30 days ago,find . -type d -mtime +30 | |
Move the files to reports_archive after extracting them from temp that match *.mp4.,"tar -cvf - -C temp.zip . | tar xvf - -C reports_archive --wildcards ""*.mp4""" | |
Verify document.docx.zip for integrity, unzip -t document.docx.zip | |
Search for files with names starting with 'file' and owned by the user 'user',"find . -type f -name ""file*"" -user user" | |
Take out only the most recent files from video.mp4.zip., unzip -U video.mp4.zip | |
List files sorted by size and modification time with colored output,ls -SltG | |
"List all files, arranged by size, with the word ""notes"" in their names.",ls -S *notes* | |
List contents of memo.txt with non-printing characters displayed, cat -v memo.txt | |
Unzip files from script.py.zip quietly, unzip -q script.py.zip | |
Show non-blank line numbers for proposal.docx, cat -b proposal.docx | |
Print database.sql while suppressing the output from the buffer., cat -u database.sql | |
"Provide a complete list of every file in the current directory, and then reverse-order the files based on their modification times.","ls -al | sort -k6,6r" | |
Duplicate images to downloads_archive including all subdirectories, cp -r images downloads_archive | |
"Make a hard link, backup, and replicate memo.txt to music_library while preserving its properties.", cp -p -l -b memo.txt music_library | |
Test integrity of contract.pdf.zip, zip -T contract.pdf.zip | |
Transfer data to music, find . -name report.pdf -execdir cp {} music \ | |
List the contents of proposal.docx while displaying each control character., cat -A proposal.docx | |
Take files out of policy.pdf.zip and replace any files that already exist., unzip -o policy.pdf.zip | |
"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 | |
Ignore directory structure when extracting files from document.docx.zip, unzip -j document.docx.zip | |
Find directories with names ending in 'backup' and with read permissions for the group,"find . -type d -name ""*backup"" -perm /g=r" | |
Extract files from proposal.docx.zip and change to output, unzip -C output proposal.docx.zip | |
Search for files modified exactly 30 days ago, find . -mtime 30 | |
Show files containing more details,ls -l | |
"Forcefully move presentation.pptx to photos, but ask for approval",mv -if presentation.pptx photos | |
"Without asking, make a backup, and force copy configuration.ini to downloads_archive while maintaining attributes", cp -f -p -b configuration.ini downloads_archive | |
Transfer downloads to archive with recursive copying and preserving attributes, cp -r -p downloads archive | |
Display files in descending order of size.,ls -S | |
List directories themselves with colored output and detailed information,ls -dGl | |
List the files in order of modification date.,ls -t | |
"Create directory ""templates"" and move files matching pattern ""*.py"" to it.",mkdir templates && mv **.py* templates | |
"List all files in the current directory with detailed information, then sort by file extension",ls -al | awk -F. '{print $NF}' | sort | |
List file sizes in human-readable format,ls -h | |
"Archive files database.sql, configuration.ini, audio.mp3 into video.mp4.zip, excluding '*.tmp' files, quietly",zip -x '*.tmp' -q video.mp4.zip database.sql configuration.ini audio.mp3 | |
"Move memo.txt to reports_archive, then prompt for a file replacement.", cp -i memo.txt reports_archive | |
Print each file's inode number.,ls -i | |
Duplicate photo.png to logs_archive and create backup copies,cp -b photo.png logs_archive | |
"While extracting files, extract executable.exe.zip", unzip -q executable.exe.zip | |
Display files with additional details,ls -l | |
Include hidden files in the list of files.,ls -a | |
Verbose mode: Move image.jpg to documents,mv -v image.jpg documents | |
"Package files audio.mp3, photo.png, presentation.pptx into policy.pdf.zip, saving extended attributes",zip -X policy.pdf.zip audio.mp3 photo.png presentation.pptx | |
"Files can be sorted based on when they were last modified, and the output can be coloured and presented in a legible fashion.",ls -lt -hG | |
Look for files with the name policy.pdf., find . -name policy.pdf | |
Duplicate proposal.docx to photos_backup with user confirmation for overwrite, cp -i proposal.docx photos_backup | |
Never use policy.pdf in place of downloads.,mv -n policy.pdf downloads | |
Output the last 15 lines of video.mp4,cat video.mp4 | tail -n 15 | |
"Display hidden files and directories in long format, then show only the permissions",ls -al | awk '{print $1}' | |
Make a copy of policy.pdf and obliterate the current files in documents_backup., cp -f policy.pdf documents_backup | |
List files sorted by size and modification time with colored output,ls -SltG | |
Display presentation.pptx with line endings, cat -E presentation.pptx | |
"Prompt before overwriting spreadsheet.xlsx in downloads, treat destination as file, and move only if newer",mv -iuT spreadsheet.xlsx downloads | |
Look for regular files, find . -type f | |
Output the last 10 lines of database.sql,cat database.sql | tail | |
Extract and update files with newer versions from presentation.pptx.zip, unzip -U presentation.pptx.zip | |
Transfer proposal.docx to temp without making any changes.,mv -n proposal.docx temp | |
"Recursive copying is used to move archives to music_library, maintaining attributes, and making a backup.", cp -r -p -b archives music_library | |
"Archive files photo.png, executable.exe, presentation.pptx into presentation.pptx.zip, excluding '*.tmp' files, using compression level 9",zip -x '*.tmp' -9 presentation.pptx.zip photo.png executable.exe presentation.pptx | |
"Out of database.sql.zip, remove database.sql.", zip -d database.sql.zip database.sql | |
Find files modified within the last 7 days,find . -type f -mtime -7 | |
Insert spreadsheet.xlsx inside the configuration.ini.zip archive., zip -u configuration.ini.zip spreadsheet.xlsx | |
"Force copy spreadsheet.xlsx to documents_archive without prompting, preserving attributes, and creating a backup", cp -f -p -b spreadsheet.xlsx documents_archive | |
Files from memo.txt.zip should be extracted into scripts_backup., unzip -d scripts_backup memo.txt.zip | |
Place video.mp4 inside of database.sql.zip, zip -u database.sql.zip video.mp4 | |
Search for standard files., find . -type f | |
Verify integrity of spreadsheet.xlsx.zip, unzip -t spreadsheet.xlsx.zip | |
Update image.jpg in configuration.ini.zip if newer, zip -f configuration.ini.zip image.jpg | |
Duplicate document.docx to archive keeping all attributes,cp -a document.docx archive | |
Display detailed information: Move script.py to scripts,mv -v script.py scripts | |
"Move audio.mp3 to reports with force, prompt for confirmation, and treat destination as file",mv -ifT audio.mp3 reports | |
"Create directory ""templates"" and remove files matching pattern ""*.mp3"".",mkdir templates && rm **.mp3* | |
Use gzip to compress files., find . -type f -exec gzip {} \ | |
Prompt for confirmation before replacing document.docx in music,mv -i document.docx music | |
"Files from image.jpg.zip should be extracted, then changed to videos_backup.", unzip -C videos_backup image.jpg.zip | |
Copy database.sql and save its properties in documents_backup., cp -p database.sql documents_backup | |
"Copy photo.png to projects_backup, ensuring that the user approves the overwrite.", cp -i photo.png projects_backup | |
Ask for confirmation before overwriting spreadsheet.xlsx with archives,mv -i spreadsheet.xlsx archives | |
Search for files with names containing 'image' and with execute permissions for others,"find . -type f -name ""*image*"" -perm /o=x" | |
Move contract.pdf to music only if it's newer or doesn't exist,mv -u contract.pdf music | |
"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 | |
Making a hard link and mirroring presentation.pptx to scripts_backup while preserving properties, cp -p -l presentation.pptx scripts_backup | |
Avoid replacing report.pdf with temp.,mv -n report.pdf temp | |
Show file sizes in human-readable units,ls -h | |
Transfer script.py to downloads_archive and ask for user confirmation if files exist,cp -i script.py downloads_archive | |
"Clone image.jpg to images_backup with attribute preservation, creating a hard link, and making a backup", cp -p -l -b image.jpg images_backup | |
List the files in reverse order based on size and modification time.,ls -Sltr | |
Print document.docx while preventing the display of several blank lines., cat -s document.docx | |
"Create the directory ""videos"" and provide a list of its contents.",mkdir videos && ls videos | |
"While maintaining its properties, copy configuration.ini to logs_archive and establish a hard link.", cp -p -l configuration.ini logs_archive | |
Look for files with the name database.sql., find . -name database.sql | |
compel Make a backup of the current files and copy document.docx to temp_folder., cp -b -f document.docx temp_folder | |
"To photos, copy the files.", find . -name database.sql -exec cp {} photos \ | |
Replicate proposal.docx to output and prompt for user confirmation,cp -i proposal.docx output | |
Search for files modified exactly 30 days ago, find . -mtime 30 | |
Files will be shown sorted by size.,ls -S | |
Transferring report.pdf to downloads will replace any preexisting files.,mv -f report.pdf downloads | |
Duplicate proposal.docx to archive with interactive confirmation required,cp -i proposal.docx archive | |
Create zip of backups and its contents, zip -r backups backups | |