Skip to main content

Module 2: wild cards, man pages, deleting files

Module 2: wild cards, man pages, deleting files

This is how wild cards work:

Instead of typing out herobrine, you could type

h*

just make sure that nothing else matches the h part.

Another example:

These files are in a folder called test:

malcolm mary tom

if you type

rm m*

it will delete mary and malcolm

if you type

rm mal*

it will delete only malcom

if you type

rm *

it will remove everything.

You can also use this to delete certain types of files (jpg, txt, mp4)

rm *.jpg

will remove every jpg file in the folder


Now you try it:


  1. open terminal
  2. navigate to your desktop (remember, it is called Desktop)
  3. create a folder using mkdir called test
  4. navigate into that folder
  5. create three text files using sudo nano, the first will be called malcolm, then mary, then tom
  6. read each one using less or more
  7. take a screenshot of this folder from the gui (graphical user interface), command-3 takes a screen shot, command-4 is a screenshot of only what you select.
  8. copy this screenshot into your weblog, so you can remember how you did this
  9. remove one file at a time using the rm command, take more screenshots

Ok, at this point, you can navigate around, login to remote computers, create and delete text files.

What's next?

Internet...



Migrated from Apple Server Wiki. Original page ID: k5Z1E8p5