Choose the command which will print all the directories within the current directory, whose names starts with the letter 'K' and are accessed in last two days.find /home -type d -mtime +2 -printfind . -type l -mtime +2 -printfind /home -type d -atime +2 -name 'K*' -printfind . -type d -atime -2 -name 'K*' -print
Question
Choose the command which will print all the directories within the current directory, whose names starts with the letter 'K' and are accessed in last two days.find /home -type d -mtime +2 -printfind . -type l -mtime +2 -printfind /home -type d -atime +2 -name 'K*' -printfind . -type d -atime -2 -name 'K*' -print
Solution
The correct command to print all the directories within the current directory, whose names start with the letter 'K' and have been accessed in the last two days is:
find . -type d -atime -2 -name 'K*' -print
Similar Questions
Which command would you use to list files in your home directory?*2 pointscd ~ls -cd /ls /
What is the command you can use that prints the current working directory you are in on your linux system?
You want to create a Bash script that will automatically delete log files older than 7 days in a specific directory. Which command sequence correctly accomplishes this task while considering best practices for error handling and efficiency?1.0 Marksfind /path/to/logs -type f -name "*.log" -mtime +7 -exec rm {} \;for file in $(find /path/to/logs -type f -name "*.log" -mtime +7); dorm "$file" || echo "Error deleting $file"donefor file in /path/to/logs/*.log; do[ -f "$file" ] && find "$file" -mtime +7 -exec rm {} \;donefind /path/to/logs -type f -name "*.log" -mtime +7 | xargs rmrm $(find /path/to/logs -type f -name "*.log" -mtime +7)Clear Answer
ou want to create a Bash script that will automatically delete log files older than 7 days in a specific directory. Which command sequence correctly accomplishes this task while considering best practices for error handling and efficiency?1.0 Marksfind /path/to/logs -type f -name "*.log" -mtime +7 -exec rm {} \;for file in $(find /path/to/logs -type f -name "*.log" -mtime +7); dorm "$file" || echo "Error deleting $file"donefor file in /path/to/logs/*.log; do[ -f "$file" ] && find "$file" -mtime +7 -exec rm {} \;donefind /path/to/logs -type f -name "*.log" -mtime +7 | xargs rm
You're working on a Linux system and need to find all empty directories within a specific directory and its subdirectories. Which command should you use?1.0 Markssearch -d empty -r ./*listdirs -efind . -type d -emptyemptyfind .dir -e -type d
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.