villaneo.blogg.se

Tableflip .gif
Tableflip .gif





tableflip .gif

If you would like to move ball_of_yarn.txt to the home directory and change the file’s name to wheres_my_food.txt, you would type: mv ~/examples/kitten_code/ball_of_yarn.txt ~/wheres_my_food.txt Moving a file is really just changing the file path name, so you can also use mvto rename a file.

tableflip .gif

Or cp current/location/of/file.txt new/location/file.txt Mv current/location/of/file.txt new/location/file.txt Now let’s look at two things that are kinda similar: mv for move and cp for copy. to go to the directory just one level up. If we are now done, we can either type cd to go all the way up to the home directory, or type cd. You could use a text editor such as vim or nano to edit this file, but we will go over that in the next post. pdf, etc) after the file name, and follow the same naming rules as for the folder / directory. Now change into the directory you just made ( cd kitten_code).īe sure to add the file type (.txt. The -p is for parent, so the parent folder will be created if it isn’t already there (as in the case of creating other_folder before creating a_folder_under_THAT). If you would like to make a directory outside of the one you are currently in, you could type mkdir -p ~/examples/other_folder/a_folder_under_THAT. (You can always look at the rules and regulations for naming files and directories.) (You can name it whatever you want, but spaces make life more difficult, so I would recommend using an underscore_between_words or .spaces. Let’s make a folder for all the files your cat is going to be making by typing mkdir kitten_code. Mkdir is for make directory, and it creates a new folder / directory in the place where you are. (For example, typing “ins” won’t be enough to get you to “install.log,” since there are other files that begin with “install.”) Please note that directory names are case sensitive. Once you start typing “examples,” you should be able to hit tab and it will auto-complete if you have enough of the word typed to distinguish it from other things in the ls. For instance, you can type cd examples, and it will move you into the examples folder, just as if you had clicked it in a window. Man, this VM is mostly just installation stuff and Puppet stuff.Ĭd is for change directory, and it moves you from one place to another. Ls is for list, and it lists all of the folders and files where you are. We are logged into the root directory, which means that we are in the main directory of the root user (which basically means we have the power to do anything we want, mwahaha.). If you ever forget where you are, you can type pwd to discover your present working directory. Now let’s explore the computer and learn some more useful commands.

  • Type in whoami to show the user identity you logged in with.
  • Type in cal to view a calendar of this month.
  • Type in date to shows the current date and time.
  • Here are the first commands we’re going to try out: If you can't locate the answer you need, open up a new question.

    tableflip .gif

    Crap, you don’t have an engineer in your kitchen? Cruise over to Stack Overflow, a site where programmers of all levels ask questions and share answers. If it doesn’t, we should find an engineer in the kitchen and ask them to help us figure out what’s wrong. Terminal should display the italicized information to the right of the command. Type the commands that look like this into terminal exactly as shown (do not change capitalized text into lowercase, or vice versa), and hit the Enter key after each one. If you want to use CLI on Windows, there will be a few minor differences. Please note that the CLI instructions in this post are for Unix / OSX (the VM we downloaded is a CentOS Linux machine, so all of the commands will work there). Here, we’re going to try out a few of the more straightforward ones. Let’s Try Terminal / Command Lineį has an excellent cheat sheet of useful command line interface (CLI) commands that you might want to print out. Instead of clicking on folders to get from place to place, we will maneuver sans mouse (Sorry, kitty, I know you like the mice, but we are learning to do more with less). We are now going to use the command line to interface with the computer. Welcome back! If you are reading this post, I’m assuming that you and your cat have read the introductory post in this series about learning the tools you need to learn Puppet, and that you’ve successfully downloaded the Puppet Learning VM.







    Tableflip .gif