OK, you have at least thought about it, so let's give a little nudge in the right direction...
Quote:
Originally Posted by bbisdd
I know that for the grep -v command will search exclude a single word, the sort command will filter alphabetically and using > will print the output elsewhere, I just can't see to be able to come up with the proper command.
|
The thing that you are looking for is called a "pipe", looks like this |, it is used to pipe the output of one command into another.
So using what you already know, try something like this...
Code:
grep -v 'california' friends | sort > newb
You might need to add a case sensitivity flag in there, and there are a few sort options to look at, but note how the pipe is used - this is a cornerstone of Unix power.
See man grep and man sort for more.
Quote:
Originally Posted by bbisdd
For number two I know chmod will change the group (or at least I believe it will chown will change the owner but I do not quite understand how to set the permissions like requested.
|
This always seems obscure to new users, and is so much taken for granted by long time users that it seems difficult to give a quick explanation.
So first let's ask if you know whow to read those permissions -rwxr-x---? That is pretty fundamental to understanding how to set them. If not read your study material for "file permissions" and see the chmod man page as well.
Hint: It is a simple binary representation of three octal values in bit order r (read), w (write) and x (execute), and group order user, group and others. A letter in a given position means that it is enabled, a '-' means it is disabled.
So rwxr-x--- means the user (owner) has read, write and execute permission, the group has read and execute, others have no rights: "rwx" "r-x" "---".
Again, see the chmod man page and come back if you need help over the hump - at least then we will be speaking the same language.
Quote:
Originally Posted by bbisdd
For the third one I know you can use the tar command, so I could do tar -vc important.tar (I believe this is correct but this is where I get stuck because I do not know how to back up two directories at once and send them to the same place)
|
You already seem to know what is needed. See man tar and try it out. (I hope that you have a system to try it on...)
Quote:
Originally Posted by bbisdd
For the last one, other than know that rsync is just used for copying, I'm not even sure at all how you would formulate that command. I've been at this for hours trying to figure these out (an of course the rest of the test) but I'm sincerely stuck.
|
See man rsync - think 'source' and 'destination'. Admittedly rsync has quite a few options, but just look at -a, -l and -v for now, pretty good hint.
Good luck and welcome to LQ!