Calling people versed in Linux
- FireAza
- Redshirt
- Posts: 12806
- Joined: Fri Feb 14, 2003 10:59 am
- Gender: Male
- Location: Hasuda City, Japan
- Contact:
Calling people versed in Linux
Can someone who knows a thing or two about Linux help me with the following:
What similarities are there between Linux and DOS with regards to redirection and pipes?
What do the following commands do? "Cd /ect/re.d/rc0.d" and "Find . -name "K??*" -print | more"
Good and bad points about the Linux VI editor? What other editors are available?
Thanks!
What similarities are there between Linux and DOS with regards to redirection and pipes?
What do the following commands do? "Cd /ect/re.d/rc0.d" and "Find . -name "K??*" -print | more"
Good and bad points about the Linux VI editor? What other editors are available?
Thanks!

"For AUS$300, you get FireAza drawing your screen image." -MartinBlank "Oh shit. For once, FireAza is right." -Deacon
"FireAza, if you're really that sneaky and quiet then you can sleep in my bed anytime, mister." -kizba
good points in vi, you can do whatever you want. bad points, yau can do whatever you want, and its commands suck big time. the cd /etc.. command is a standard change directory cammond, starting from root(/). the find . -name "K??*" -print | more will, I believe, find in the current directory(.) files with a name beginning with a capital K with at least two more characters(??) followed by any characters(*). It will print out the output, and the _more will redirect the output to the program 'more' which is a basic text viewer. probably better to use less, as that allows better scrolling.
other editors depend on distro and type of install. you probably have nano, pico or some varient, which allow a bit more of an intuitive text editing(no insert modes etc., slightly easier to save and so on) and probably emacs as well. If you are using a desktop environment like KDE or gnome, you should have kedit, gedit or nedit, which are like(but much better than) windows notepad for editing in a windows environment.
hope that helps, also for how to use commands and such, there is always the man function. just type in man followed by the cammond (or with -k to do a search) and you get a normally fairly informative page of information
other editors depend on distro and type of install. you probably have nano, pico or some varient, which allow a bit more of an intuitive text editing(no insert modes etc., slightly easier to save and so on) and probably emacs as well. If you are using a desktop environment like KDE or gnome, you should have kedit, gedit or nedit, which are like(but much better than) windows notepad for editing in a windows environment.
hope that helps, also for how to use commands and such, there is always the man function. just type in man followed by the cammond (or with -k to do a search) and you get a normally fairly informative page of information
I'm still an atheist, thank god.
Christianity: The belief in an invisible santa
RLHLC

Christianity: The belief in an invisible santa
RLHLC

- FireAza
- Redshirt
- Posts: 12806
- Joined: Fri Feb 14, 2003 10:59 am
- Gender: Male
- Location: Hasuda City, Japan
- Contact:
It's good point is it's bad point? Do you mean, like, that because you can do anything, it's easy to break something? Thanks for everything else though!good points in vi, you can do whatever you want. bad points, yau can do whatever you want

"For AUS$300, you get FireAza drawing your screen image." -MartinBlank "Oh shit. For once, FireAza is right." -Deacon
"FireAza, if you're really that sneaky and quiet then you can sleep in my bed anytime, mister." -kizba
- Spongiform
- Redshirt
- Posts: 3220
- Joined: Sun Aug 22, 2004 11:18 pm
- Gender: Male
- Location: Jersey
- Deacon
- Shining Adonis
- Posts: 44234
- Joined: Wed Jul 30, 2003 3:00 pm
- Gender: Male
- Location: Lakehills, TX
Spongiform, yes, that reminiscent of the ol' "type 'format c: /y'!! haha!" or, more accurately, using deltree and such.
rm -rf is the command to force the recursive removal of all files and folders under a certain starting point, in this case /, or root (much like c:\ would be).
rm -rf is the command to force the recursive removal of all files and folders under a certain starting point, in this case /, or root (much like c:\ would be).
The follies which a man regrets the most in his life are those which he didn't commit when he had the opportunity. - Helen Rowland, A Guide to Men, 1922
- Martin Blank
- Knower of Things

- Posts: 12709
- Joined: Fri Feb 07, 2003 4:11 am
- Real Name: Jarrod Frates
- Gender: Male
- Location: Dallas, TX
- Contact:
[quote="FireAza";p="564779"]
If you're going to get into Linux, it's a really, really good idea to learn either vi or emacs, as you'll almost always find one or the other on a Linux distro, and nano/pico aren't always available. Because I don't like people committing suicide, I recommend vi.
If you're going to go down this road, I highly recommend getting a cheat-sheet until you're familiar with it. (I've been using vi for three years and I still need cheat-sheets for some things.) Here are some of the more useful ones (all are PDFs, so consider yourself warned).
http://www.kcomputing.com/kcvi.pdf (Best for beginners, the non-Unix people at work love this)
http://www.cs.uidaho.edu/~rinker/ed03.pdf (More comprehensive, less organized)
http://www.ensyncsolutions.com/library/ ... _sheet.pdf (Similar to last, but more readable)
http://ploug.eu.org/doc/l-vi-a4.pdf (Tutorial cheat sheet)
It's good point is it's bad point? Do you mean, like, that because you can do anything, it's easy to break something? Thanks for everything else though![/quote]good points in vi, you can do whatever you want. bad points, yau can do whatever you want
If you're going to get into Linux, it's a really, really good idea to learn either vi or emacs, as you'll almost always find one or the other on a Linux distro, and nano/pico aren't always available. Because I don't like people committing suicide, I recommend vi.
If you're going to go down this road, I highly recommend getting a cheat-sheet until you're familiar with it. (I've been using vi for three years and I still need cheat-sheets for some things.) Here are some of the more useful ones (all are PDFs, so consider yourself warned).
http://www.kcomputing.com/kcvi.pdf (Best for beginners, the non-Unix people at work love this)
http://www.cs.uidaho.edu/~rinker/ed03.pdf (More comprehensive, less organized)
http://www.ensyncsolutions.com/library/ ... _sheet.pdf (Similar to last, but more readable)
http://ploug.eu.org/doc/l-vi-a4.pdf (Tutorial cheat sheet)
If I show up at your door, chances are you did something to bring me there.
- Deacon
- Shining Adonis
- Posts: 44234
- Joined: Wed Jul 30, 2003 3:00 pm
- Gender: Male
- Location: Lakehills, TX
[quote="Martin Blank";p="564852"]Because I don't like people committing suicide, I recommend vi.[/quote]
You prefer for them to starve to death, tangled in a web of lies, lost in a maze of ridiculous commands, drowning in a horrible quicksand of anti-intuitiveness?
You prefer for them to starve to death, tangled in a web of lies, lost in a maze of ridiculous commands, drowning in a horrible quicksand of anti-intuitiveness?
The follies which a man regrets the most in his life are those which he didn't commit when he had the opportunity. - Helen Rowland, A Guide to Men, 1922
im pretty much the same with vi. Hate hate hate it. I taught myself how to use emacs(i was bored at work. VERY bored). And I can do some basic editing in vi, with a great deal of struggling.
And fireaza, that is exactly the point. With programs that let you do anything you want, it is very very easy to break something. Admittedly, that quote is more commonly applied to sendmail(do not look at its config files if you value your sanity) and such.
Also, on a comparison of emacs and vi. vi can do everything except make the coffee. Emacs can even do that.
So yeah. possibly learn emacs or vi at some point. but start off with something that wont leave you screaming and running in the opposite direction, like pico or nano. Also, avoid logging in as the root user as much as possible, as then you won't be able to run commands like rm -rf / (root user again is blessed and cursed with the ability to do anything and everything it wants... generally without linux complaining)
And fireaza, that is exactly the point. With programs that let you do anything you want, it is very very easy to break something. Admittedly, that quote is more commonly applied to sendmail(do not look at its config files if you value your sanity) and such.
Also, on a comparison of emacs and vi. vi can do everything except make the coffee. Emacs can even do that.
So yeah. possibly learn emacs or vi at some point. but start off with something that wont leave you screaming and running in the opposite direction, like pico or nano. Also, avoid logging in as the root user as much as possible, as then you won't be able to run commands like rm -rf / (root user again is blessed and cursed with the ability to do anything and everything it wants... generally without linux complaining)
I'm still an atheist, thank god.
Christianity: The belief in an invisible santa
RLHLC

Christianity: The belief in an invisible santa
RLHLC

- FireAza
- Redshirt
- Posts: 12806
- Joined: Fri Feb 14, 2003 10:59 am
- Gender: Male
- Location: Hasuda City, Japan
- Contact:
Just for reference, I'm not planning to switch to Linux at home, but we're doing a lot of Linux-related stuff at collage, so there's some stuff I need to know. Also, does anyone know what similarities are there between Linux and DOS with regards to redirection and pipes?

"For AUS$300, you get FireAza drawing your screen image." -MartinBlank "Oh shit. For once, FireAza is right." -Deacon
"FireAza, if you're really that sneaky and quiet then you can sleep in my bed anytime, mister." -kizba
- edge
- Redshirt
- Posts: 3376
- Joined: Mon Jun 02, 2003 9:43 pm
- Gender: Male
- Location: Pittsburgh, PA
- Contact:
[quote="Deacon";p="564775"]vi?? I hate it. Use nano or pico for editing configs until you get your GUI up and running.[/quote]
Agreed.
Momma always said vi was the debil!
It's a good idea to learn vi and be familliar with it (When I started this job, I regretted barely ever using it, as our unix systems only had vi, and in a time critical situation, going to download and install nano or pico was not an option).
It drives me absolutly insane though....no text editor should ever be so difficult to use.
Edit:
Redirection and pipes work *basically* the same in Linux. Piping a command to another basically feeds the output of one command to another. A rather common one might be: ps aux |grep emacs
That would give the process listing with the a, u, and x options, and pipe the output into grep, which would filter out any lines containing emacs.
Redirection is basically the same. You can use > to redirect output to a file, or you can use >> to append the output to a file.
If you have a file that already contains something, redirecting to it (>) would overwrite the contents of the file, where as appending (>>) would add to the end.
For example: echo "ls -la" > myscript.sh
Assuming myscript.sh doesn't exist, that file would be created, and the text ls -la would be put in it.
Agreed.
Momma always said vi was the debil!
It's a good idea to learn vi and be familliar with it (When I started this job, I regretted barely ever using it, as our unix systems only had vi, and in a time critical situation, going to download and install nano or pico was not an option).
It drives me absolutly insane though....no text editor should ever be so difficult to use.
Edit:
Redirection and pipes work *basically* the same in Linux. Piping a command to another basically feeds the output of one command to another. A rather common one might be: ps aux |grep emacs
That would give the process listing with the a, u, and x options, and pipe the output into grep, which would filter out any lines containing emacs.
Redirection is basically the same. You can use > to redirect output to a file, or you can use >> to append the output to a file.
If you have a file that already contains something, redirecting to it (>) would overwrite the contents of the file, where as appending (>>) would add to the end.
For example: echo "ls -la" > myscript.sh
Assuming myscript.sh doesn't exist, that file would be created, and the text ls -la would be put in it.
- edge
- Redshirt
- Posts: 3376
- Joined: Mon Jun 02, 2003 9:43 pm
- Gender: Male
- Location: Pittsburgh, PA
- Contact:
[quote="Deacon";p="564957"]And if myscript.sh did work, it would overwrite it, no? Whereas using ">>" would append to the end, yes?[/quote]
Exactly. If the file already exists and contain data, using > would overwrite it completely (so instead of what was in there before, you'd just have whatever was redirected to it, ls -la, in this example).
And >> would ofcourse just add to what's already in that file.
So if the file didn't already exist, you could do:
echo "ls -la" > myscript.sh
echo "echo Directory Listing complete" >> myscript.sh
You would end up with this in the file myscript.sh:
ls -la
echo Directory Listing complete
DOS works the same way.
Exactly. If the file already exists and contain data, using > would overwrite it completely (so instead of what was in there before, you'd just have whatever was redirected to it, ls -la, in this example).
And >> would ofcourse just add to what's already in that file.
So if the file didn't already exist, you could do:
echo "ls -la" > myscript.sh
echo "echo Directory Listing complete" >> myscript.sh
You would end up with this in the file myscript.sh:
ls -la
echo Directory Listing complete
DOS works the same way.
- FireAza
- Redshirt
- Posts: 12806
- Joined: Fri Feb 14, 2003 10:59 am
- Gender: Male
- Location: Hasuda City, Japan
- Contact:
Re: Calling people versed in Linux
Ah, thanks for that edge.

"For AUS$300, you get FireAza drawing your screen image." -MartinBlank "Oh shit. For once, FireAza is right." -Deacon
"FireAza, if you're really that sneaky and quiet then you can sleep in my bed anytime, mister." -kizba
Who is online
Users browsing this forum: No registered users and 1 guest
