Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 3 : Deletes .log files under /var that were last modified more than 30 days ago / /var के अंतर्गत 30 दिन से पहले संशोधित .log फाइलों को हटाता है

Advertisement

Detailed Solution

सही उत्तर Deletes .log files under /var that were last modified more than 30 days ago / /var के अंतर्गत 30 दिन से पहले संशोधित .log फाइलों को हटाता है है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

What does the Linux command `find /var -name '*.log' -mtime +30 -delete` do? / Linux कमांड `find /var -name '*.log' -mtime +30 -delete` क्या करता है?

1.
Lists .log files under /var modified in the last 30 minutes / /var के अंतर्गत पिछले 30 मिनट में संशोधित .log फाइलों को सूचीबद्ध करता है
2.
Deletes all .log files under /var that were modified within the last 30 days / /var के अंतर्गत पिछले 30 दिनों में संशोधित सभी .log फाइलों को हटाता है
3.
Deletes .log files under /var that were last modified more than 30 days ago / /var के अंतर्गत 30 दिन से पहले संशोधित .log फाइलों को हटाता है
4.
Moves .log files older than 30 days to the trash directory / 30 दिन से पुरानी .log फाइलों को ट्रैश डायरेक्टरी में ले जाता है

Correct Answer: Deletes .log files under /var that were last modified more than 30 days ago / /var के अंतर्गत 30 दिन से पहले संशोधित .log फाइलों को हटाता है

`-mtime +30` matches files whose data was last modified more than 30*24 hours ago (not minutes), `-name '*.log'` filters log files, and `-delete` removes the matches. / `-mtime +30` उन फाइलों से मेल खाता है जिनका डेटा 30*24 घंटे से पहले संशोधित हुआ था (मिनट नहीं), `-name '*.log'` लॉग फाइलों को छाँटता है, और `-delete` मेल खाने वालों को हटाता है।

Downloaded from PrepSnap (prepsnap.in)