1 / 9

Day 19

Day 19. Ailases. aliases. Sometimes its just hard to remember a command. If you know your going to have problems remembering it…make an alias for it. Example…type just an “l” (lower case L) and hit enter. Weird…it ran “ls” This is a default alias made for us who mistype a lot.

shayla
Download Presentation

Day 19

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Day 19 Ailases

  2. aliases • Sometimes its just hard to remember a command. • If you know your going to have problems remembering it…make an alias for it. • Example…type just an “l” (lower case L) and hit enter. • Weird…it ran “ls” • This is a default alias made for us who mistype a lot.

  3. Making a new alias • Lets imagine we can never remember the command “more”. • alias showme=more • Now you can do: • showme filename • And it will run: • more filename

  4. Seeing all your aliases • Just type • alias • To see all currently defined aliases. • Remember an alias is only valid until you log out. If you want it to be there forever, add it to your .bashrc file.

  5. Example tar • tar stands for Tape ARchive. • Origionally it was created to write information to backup tapes. • However, its also useful to put a bunch of files together into one file.

  6. Making a tar file • Imagine you have a directory called homeworks • In it, there are 5 files, hw1 hw2 hw3 hw4 and hw5 • You could do the followingcd homeworkstar cvf homeworks.tar * • This would create a file called homeworks.tar which contains the 5 homework files.

  7. Seeing whats in a tar file • If you type: • tar tf homeworks.tar • You would see a list of what is in the tar file: • hw1, hw2, hw3, hw4, hw5

  8. Getting things out of a tar file • tar xvf homeworks.tar • Would extract verbosely from the file homeworks.tar.

  9. Make the following aliases • mktar • Which should run tar cvf • lstar • Which should run tar tf • untar • Which should run tar xvf

More Related