We invest in companies where we are sure the share pric
http://www.internetconsultantonline.com
You have now installed Linux and the first thing you did was login as 'root'. Then you provided a password so that you and ONLY you could login to the system as 'root'. When you decide to work as root, you had better go into a phone booth first and change into a blue suit with a big 'S' on the front because 'root' is known as the 'superuser' (you can skip the red tights if you want).
That's really not meant to be just a witty reference to the Man of Steel. Actually, it is much more glamorous to be 'Superman' but root is actually more like the 'janitor' of the Linux system. Root has the keys to everything. He can shut off the lights, shut off the heat, lock you out of the building; he has to clean up the system and in the end make sure everything runs. And the most important thing about being a janitor - he sees everything.
| cdrom | home | opt | tmp | ||
| dev | lib | proc | usr | ||
| bin | etc | lost+found | root | var | |
| boot | floppy | mnt | sbin |
To show the student the basic uses of the 'cd' command The first command you'll use is 'cd'. We talked about this in a previous lesson, so let's review the basics.
'cd' means 'change directory'.
To show the student the various variations of the 'ls' command 'ls' is another command that we've discussed a bit before. Let's go into some more detail.
Typing 'ls' will list the contents of a directory with just information about file names.
You can use 'ls a*' to list the names of all the files that begin with the letter 'a' and so on down through the alphabet. Please do not use the cuneiform alphabet unless you're from ancient Mesopotamia.
To introduce the student to these commands 'more' is a command that you can use to read, for example, what's written in that 'stuff' file that Tony sent you.
You would type 'more stuff' to see the jokes.
Press the 'q' key to stop viewing the file
You can also copy entire directories to another place. As I mentioned in a previous lesson, you may want to work as two different users for two different jobs. You may be working as 'fred' and your directory 'tonyd' is in the directory /home/bob, where you work as 'bob'
As 'fred', you can use the command:
cp -r /home/bob/tonyd/ /home/fred/
If you're in your home directory you can use this command
cp -r /home/bob/tonyd/ ./
to copy the directory 'tonyd' to your home directory.
You may also use the command
cp -r /home/bob/tonyd/ ~
with the tilde wherever you happen to be and that will automatically copy the directory 'tonyd' to your other home directory.
Let's go back yet again to Tony's file, 'stuff' again. 'stuff' is not a good name for a file just as 'book' isn't a good name for a book. Just imagine: "The number one bestselling book this week is 'Book' by John Author.
You should probably re-name this file to something meaningful. I would suggest doing something like this:
mv stuff tonys_jokes
mkdir my_friends
There are no whistles or buzzers. If you'd like some sort of acknowledgment, you could type
mkdir --verbose my_friends
and it will tell you that you created the directory.
'rm' is for removing or deleting files. That means, sending them into non-existence, oblivion, bye-bye.
So you have to be careful with 'rm'. That's why we put an entry into our '.bashrc' file: alias rm='rm -i' so that it asks you if that's what you really want to do.
If you created a file called 'bad_jokes' and you wanted to get rid of the file, you would type rm bad_jokes, and because you made an alias, it will ask you.
rm: remove `bad_jokes'?:
No comments:
Post a Comment