What does this command string do?find / -size +10M -exec ls -l {} ;1.0 MarksIt uses the ls command to find all files in the filesystem matching the {} wildcard.It finds all files larger than 10 MB and long lists them using the ls command.It finds all files using ls -l and hands them off to the find command to display.It finds all files older than 10 minutes and long lists them using the ls command.
Question
What does this command string do?find / -size +10M -exec ls -l {} ;1.0 MarksIt uses the ls command to find all files in the filesystem matching the {} wildcard.It finds all files larger than 10 MB and long lists them using the ls command.It finds all files using ls -l and hands them off to the find command to display.It finds all files older than 10 minutes and long lists them using the ls command.
Solution
The command string find / -size +10M -exec ls -l {} ; is used in Unix or Linux based systems. Here's what it does, step by step:
-
find /- This part of the command initiates thefindcommand starting from the root directory represented by/. Thefindcommand is used to search and locate the list of files and directories based on conditions you specify. -
-size +10M- This is a condition that is passed to thefindcommand. It tellsfindto look for files that are greater than 10 Megabytes in size. -
-exec- This option is used infindcommand to execute a command on each file that matches the conditions. The{}is a placeholder thatfindreplaces with the current file name. -
ls -l {} ;- This is the command thatfindexecutes on each file that matches the conditions.ls -lis a command to long list the details of files. The{}is replaced by the current file name. The;at the end signifies the end of the-execcommand.
So, in summary, this command finds all files in the filesystem starting from root, that are larger than 10MB in size, and then lists the details of those files.
Similar Questions
What does the following Linux command do? ls | grep labs
.Which command is used to list files in a directory in Unix/Linux?
In which directory will you find the executable for ls? *
Which of the following commands will provide a long file listing sorted by file size?Group of answer choicesls -lhls -lls -Fls -lS
37. Which command is used to display all the files including hidden files in your current and its subdirectories?ls –Rls –als –aRls –l
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.