Question
Download Solution PDFWhich command in Windows 10 CMD will delete all .log files in the current directory without asking for confirmation?
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFThe correct answer is del *.log /q.
Key Points
- del *.log /q is a Windows CMD command used to delete all .log files in the current directory without prompting for confirmation.
- The /q switch in the command stands for "quiet mode," which suppresses the confirmation prompt.
- This command ensures efficient deletion of multiple files in a batch without any manual interruptions.
- It is especially useful in scenarios where logs accumulate over time and need regular cleanup.
- Using this command requires caution as it deletes files permanently without asking for confirmation.
Additional Information
- del Command
- The del command in Windows CMD is used to delete one or more files.
- It does not delete directories; for directories, the rmdir command is used.
- Using the /p switch prompts confirmation before each file deletion.
- Wildcard characters like * and ? can be used to specify multiple files.
- erase Command
- The erase command is an alias for the del command in Windows CMD.
- It functions identically to del and can be used interchangeably.
- File Extensions
- A file extension like .log identifies the type of file, typically used for storing logs or event records.
- Log files are often created automatically by software or operating systems to track activities and errors.
- Precautions When Using CMD Commands
- Commands like del *.log /q should be used carefully to avoid accidental data loss.
- Always verify the directory and file patterns before executing such commands.
- Consider creating backups of important files before running deletion commands.
Last updated on Jul 21, 2025
-> RRB NTPC UG Exam Date 2025 released on the official website of the Railway Recruitment Board. Candidates can check the complete exam schedule in the following article.
-> SSC Selection Post Phase 13 Admit Card 2025 has been released @ssc.gov.in
-> The RRB NTPC Admit Card CBT 1 will be released on its official website for RRB NTPC Under Graduate Exam 2025.
-> The RRB NTPC 2025 Notification released for a total of 11558 vacancies. A total of 3445 Vacancies have been announced for Undergraduate posts while a total of 8114 vacancies are announced for Graduate-level posts in the Non-Technical Popular Categories (NTPC).
-> Prepare for the exam using RRB NTPC Previous Year Papers.
-> UGC NET June 2025 Result has been released by NTA on its official site