Welcome to PC Scripts Daily, second edition! There isn't much to talk about today but I tried to put together some content I've been working on for PC Scripts. My computer is still dead so I'm working on my iPod Touch.
Bash Tutorial - Part 1
I have been hard at work on a complete Bash guide. Here is what I have so far.
The cd command is probably the most basic & important command in Bash. This command changes the current working directory, which can be printed using the pwd (present working directory). For example, if your present working directory is your home folder (~) and you type cd Documents, your present working directory will be changed to ~/Documents. There are a few file path shortcuts that are very important. The . shortcut is the present working directory. The .. shortcut is the parent directory. The . shortcut is not very useful yet but it will come in handy later. The .. shortcut is the easiest way to chage the current working directory to the parent directory. You can do this by typing cd ... Another useful command is ls. ls lists all of the files in the present working directory.
The cat command displays a file. You can either give it the name of a file in the present working directory or the entire path of a file. For example, if you want to "cat" the file foo.txt (located in the present working directory), you would type cat foo.txt. You can also give the entire path of a file that you want to cat. For example, if you wanted to cat foo.txt but foo.txt was in ~/Desktop/ and you weren't, you can type cat ~/Desktop/foo.txt. If foo.txt is very long, you can use the less command. It is the same as cat except you can scroll through the file with the up & down arrow keys. This is useful for large files.
Next Edition
That's all for today! Tomorrow I'll continue the Bash tutorial and maybe some more content.
No comments:
Post a Comment