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 19, 2025
-> RRB NTPC Under Graduate Exam Date 2025 has been released on the official website of the Railway Recruitment Board.
-> The RRB NTPC Admit Card will be released on its official website for RRB NTPC Under Graduate Exam 2025.
-> CSIR NET City Intimation Slip 2025 Out @csirnet.nta.ac.in
-> HSSC CET Admit Card 2025 has been released @hssc.gov.in
-> Candidates who will appear for the RRB NTPC Exam can check their RRB NTPC Time Table 2025 from here.
-> The RRB NTPC 2025 Notification released for a total of 11558 vacancies. A total of 3445 Vacancies have been announced for Undergraduate posts like Commercial Cum Ticket Clerk, Accounts Clerk Cum Typist, Junior Clerk cum Typist & Trains Clerk.
-> A total of 8114 vacancies are announced for Graduate-level posts in the Non-Technical Popular Categories (NTPC) such as Junior Clerk cum Typist, Accounts Clerk cum Typist, Station Master, etc.
-> Prepare for the exam using RRB NTPC Previous Year Papers.
-> Get detailed subject-wise UGC NET Exam Analysis 2025 and UGC NET Question Paper 2025 for shift 1 (25 June) here
->Bihar Police Driver Vacancy 2025 has been released @csbc.bihar.gov.in.