15.01.2024 Views

CompTIA A+ Certification All-in-One Exam Guide

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SIM Check out the four “Wildcard” sims in the Chapter 15 section of

http://totalsem.com/100x. The two Type! sims plus the Show! and the Click!

will prepare you for any number of performance-based questions CompTIA

throws at you in the 1002 exam.

Deleting Files

To delete files, you use the del (or erase) command in Windows and the rm

command in macOS and Linux. Deleting files is simple—maybe too simple.

As I said before, deleting a file in your GUI gives you the luxury of retrieving

deleted files from the Recycle Bin on those “Oops, I didn’t mean to delete

that” occasions everyone encounters at one time or another. The command

line, however, shows no such mercy to the careless user. It has no function

equivalent to the Recycle Bin or Trash. Once you have erased a file, you can

recover it only by using special recovery utilities (maybe . . . but don’t bet on

it). Again, the rule here is to check twice and delete once.

To delete a single file in Windows, type the del command followed by the

name of the file to delete. To delete the file reportdraft1.docx, for example,

type this:

del reportdraft1.docx

In macOS and Linux, do the same thing but type rm in place of del, like

this:

rm reportdraft1.docx

Although nothing appears on the screen to confirm it, the file is now gone.

To confirm that the reportdraft1.docx file is no longer listed, use the dir or ls

command.

You can use wildcards with the del and rm commands to delete multiple

files. For example, to delete all files with the extension .txt in a folder, you

can type this in macOS/Linux:

rm *.txt

You can place the wildcard anywhere in the name. For example, to delete

all files with the filename “config” in a Windows directory, type del config.*.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!