View Full Version : Linux Linux Quiz
Just wanted to do this and let people try it out. A series of problems for you to provide a solution to. First I will give a problem and you try and find the solution. You have to provide "source" to your problem. For example:
You present a problem and somebody else will provide the solution. The closest answer to the solution wins. But you need to provide the answer to the problem and why that would be the closest answer.
You do not have to know the answers to the problems you present just know that they can be solved by a human being and give the source of the closest solution you find for the problem you presented...............lol.
Ok here is mine. I start out simple :rolleyes:
Q: You want to have Linux mount a drive or partition automatically at boot time, what configuration file do you edit to achieve this. Hint: Dont stab yourself :smilie4:
You can present questions before any other ones are answered. Its in no particular order. Btw, you may use any resources............google, etc. We will keep score by the number of questions you provide correct solutions for. And please feel free to add additional rules :)
fstab!
Heres a question:
What file do you have to edit to add a WM to your non-graphical login screen?
.xinitrc :)
/etc/fstab is correct. You get 1 point.
You get point too, yay!
Question: Who started linux?
:lol: thats a gimme!
Hunted
02-20-2004, 12:37 AM
stabs himself
Originally posted by Hunted@19 February 2004 - 18:37
stabs himself
You don't get any points, hunted. :(
4play
02-20-2004, 12:41 AM
mr linus torvalds did.
my question what version of unix pissed him off so much he wrote his own? :frusty:
:blink: Linus Torvalds.
Okay, here's an easy one. Where is the mouse config?
4play
02-20-2004, 12:46 AM
Okay, here's an easy one. Where is the mouse config?
xfree86.
Originally posted by haxor41789@19 February 2004 - 18:43
:blink: Linus Torvalds.
Okay, here's an easy one. Where is the mouse config?
/etc/X11/XF86Config :P
/etc/X11/XF86Config
Edit: didnt see your post shn!! sorry!
What is the command to generate an ssh public/private dsa key pair? :)
@LSA........no problem, its whoever answers first :P
Originally posted by shn@19 February 2004 - 18:55
What is the command to generate an ssh public/private dsa key pair? :)
:o
That's way out of my league!
4play
02-20-2004, 01:00 AM
/usr/bin/ssh-keygen -b 1024 -N ""
out of mine as well but google is handy :rolleyes:
You can assume an answer correct unless its not then let the person who incorrectly answered know that they are incorrect :) That way someone else can answer knowing that the question has not been answered before.
create a symbolic link to /usr/share/xxx Hint: you are already in the current directory just issue the command.
Originally posted by 4play@19 February 2004 - 19:00
/usr/bin/ssh-keygen -b 1024 -N ""
out of mine as well but google is handy :rolleyes:
:lol: I was just going to add my google findings. :lol:
Question: What is 'runlevel 3'
Originally posted by LSA+19 February 2004 - 19:11--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 19 February 2004 - 19:11)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-4play@19 February 2004 - 19:00
/usr/bin/ssh-keygen -b 1024 -N ""
out of mine as well but google is handy :rolleyes:
:lol: I was just going to add my google findings. :lol:
Question: What is 'runlevel 3'[/b][/quote]
System boots up in text mode and networking :)
I take break now :D
Originally posted by shn@19 February 2004 - 19:11
You can assume an answer correct unless its not then let the person who incorrectly answered know that they are incorrect :) That way someone else can answer knowing that the question has not been answered before.
create a symbolic link to /usr/share/xxx Hint: you are already in the current directory just issue the command.
ln ./xxx /home/j00/symlink
Not sure if that is correct or not. :unsure:
Originally posted by LSA+19 February 2004 - 19:18--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 19 February 2004 - 19:18)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@19 February 2004 - 19:11
You can assume an answer correct unless its not then let the person who incorrectly answered know that they are incorrect :) That way someone else can answer knowing that the question has not been answered before.
create a symbolic link to /usr/share/xxx Hint: you are already in the current directory just issue the command.
ln ./to_be_linked /home/j00/symlink
Not sure if that is correct or not. :unsure:[/b][/quote]
You get full credit ;) thats close enough
It's ln -s /to_be_linked /home/j00/symlink
Originally posted by shn+19 February 2004 - 19:12--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 19 February 2004 - 19:12)</td></tr><tr><td id='QUOTE'>
Originally posted by LSA@19 February 2004 - 19:11
<!--QuoteBegin-4play@19 February 2004 - 19:00
/usr/bin/ssh-keygen -b 1024 -N ""
out of mine as well but google is handy :rolleyes:
:lol: I was just going to add my google findings. :lol:
Question: What is 'runlevel 3'
System boots up in text mode and networking :)
I take break now :D [/b][/quote]
Shn has 4 points now! :o
New question:
What is /etc/ used for?
Originally posted by LSA@19 February 2004 - 19:28
New question:
What is /etc/ used for?
configuration files B)
4play
02-20-2004, 02:45 AM
go on shn you got it right its your turn to ask a question :P
What is the latest stable Linux kernel version. :)
Originally posted by 4play@19 February 2004 - 20:45
go on shn you got it right its your turn to ask a question :P
I'll go again:
What programming language is most of the linux kernel written in?
EDIT:
Ahhh, didnt see it again shn!!! :lol: :lol:
2.6.3 btw
Hunted
02-20-2004, 03:33 AM
Originally posted by LSA+19 February 2004 - 20:39--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 19 February 2004 - 20:39)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Hunted@19 February 2004 - 18:37
stabs himself
You don't get any points, hunted. :( [/b][/quote]
I know almost nothing about Linux lol
4play
02-20-2004, 03:36 AM
its mostly c with some c++ and a bit of aseembly.
what are the basic commands to compiling your own kernel ( the 2.6 version)
Originally posted by 4play@19 February 2004 - 21:36
its mostly c with some c++ and a bit of aseembly.
what are the basic commands to compiling your own kernel ( the 2.6 version)
make config
make oldconfig
make menuconfig
make xconfig
bla bla
I love this thread, thanks shn B)
4play
02-20-2004, 03:50 AM
sounds about right to me whats your question ?
:)
hmmm
What is the command to take a screenshot of the whole screen?
4play
02-20-2004, 04:04 AM
import -window /file.jpg
what does gnu stand for ?
GNU's not Unix
What is gentoo's package manager command?
Originally posted by 4play@19 February 2004 - 21:36
its mostly c with some c++ and a bit of aseembly.
what are the basic commands to compiling your own kernel ( the 2.6 version) cd /usr/src/linux
menuconfig
make dep
make clean
make bzimage
cp ./bzimage /boot
reboot
:)
4play
02-20-2004, 04:21 AM
emerge - package_name
what process is always assigned 1 as its pid.
Originally posted by shn@19 February 2004 - 22:18
cd /usr/src/linux
menuconfig
make dep
make clean
make bzimage
cp ./bzimage /boot
reboot
:)
Is that all you have to do to make a new kernel?
I downloaded 2.6.2 a week ago but haven't touched it because I didn't know how to do it, and most tutorials were really old.
I missed the Linux meeting :(
I couldn't get a ride until it was already started, no slackware for me yet :(
4play
02-20-2004, 04:25 AM
its slighty more work then that since you do have to sort out the config file im always screwing that up.
i know you dont have to do make clean with the 2.6 kernels and im not sure about make dep.
Originally posted by 4play@19 February 2004 - 22:21
emerge - package_name
what process is always assigned 1 as its pid.
init
I can't think of a question right now :P
Originally posted by 4play@19 February 2004 - 22:25
its slighty more work then that since you do have to sort out the config file im always screwing that up.
i know you dont have to do make clean with the 2.6 kernels and im not sure about make dep.
http://www.kernel.org/pub/linux/kernel/README :)
You have to type "make dep" to make the dependencies for your kernel modules that you select with menuconfig. ;)
"make clean" :lol: it cleans up the mess you make after compiling..
Let me know if I get point B)
And you said basic :angry:
leftism
02-20-2004, 10:32 AM
The questions seem to have dried up so..... :)
If you have these files in your home directory...
file.c
main.c
defines.h
program.tar.gz
index.html
How can you delete the C source files and the header file only, using just one command?
Originally posted by leftism@20 February 2004 - 04:32
The questions seem to have dried up so..... :)
If you have these files in your home directory...
file.c
main.c
defines.h
program.tar.gz
index.html
How can you delete the C source files and the header file only, using just one command?
:lol: :lol: :lol: ..............dried up
*waits for competition*
Why make it difficult just use "rm" and delete all that shit :lol:
leftism
02-20-2004, 12:05 PM
Originally posted by shn
Why make it difficult just use "rm" and delete all that shit
Because the idea isnt to "delete all that shit", just the C files and the header file without having to use the rm command 3 times in a row :)
4play
02-20-2004, 01:06 PM
im guesssing something along the lines of
rm *.c | *.h
how do you change the # in the terminal window to $, or whatever string you want? :)
leftism
02-20-2004, 02:51 PM
@4play Your on the right track, but thats not the right answer :)
@shn
I would guess that you have to change something in .bashrc?
Originally posted by leftism@20 February 2004 - 08:51
@4play Your on the right track, but thats not the right answer :)
@shn
I would guess that you have to change something in .bashrc?
The correct asnwer is typing PS1="$" from a terminal.
leftism
02-20-2004, 03:04 PM
Originally posted by shn
The correct asnwer is typing PS1="$" from a terminal.
But wouldn't that mean you'd have to do that every time you logged in? If you put it in the .bashrc file it will always be $.
Originally posted by leftism+20 February 2004 - 09:04--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (leftism @ 20 February 2004 - 09:04)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn
The correct asnwer is typing PS1="$" from a terminal.
But wouldn't that mean you'd have to do that every time you logged in? If you put it in the .bashrc file it will always be $.[/b][/quote]
If you wanted to set the shell variable to that permanently then yes you could edit .bashrc
PS1=""
export PS1
In vi, what does this expression yield /^[a-zA-Z]/ :)
leftism
02-20-2004, 03:53 PM
Originally posted by shn
In vi, what does this expression yield /^[a-zA-Z]/
It searches for non-alphabetic characters? :)
Assuming I got it right, (fingers crossed :D) What command would you issue to block all incoming packets to port 80 (TCP) ?
iptables -A INPUT -i ppp0 -p tcp 80
Probably not right...I just read a little bit from the man page of iptables
:sadwalk:
Originally posted by leftism+20 February 2004 - 09:53--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (leftism @ 20 February 2004 - 09:53)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn
In vi, what does this expression yield /^[a-zA-Z]/
It searches for non-alphabetic characters? :)
Assuming I got it right, (fingers crossed :D) What command would you issue to block all incoming packets to port 80 (TCP) ?[/b][/quote]
/^[a-zA-Z]/ Matches if the line starts with any letter :)
iptables -A INPUT -p tcp --dport 80 -j DROP
leftism
02-20-2004, 04:16 PM
iptables -A INPUT -i ppp0 -p tcp 80
Probably not right...I just read a little bit from the man page of iptables
close :)
iptables -A INPUT -p tcp --dport 80 -j DROP
You should specify the interface if your on a host with multiple interfaces but since I'm not, I never do.
leftism
02-20-2004, 04:17 PM
Originally posted by shn
/^[a-zA-Z]/ Matches if the line starts with any letter
You sure dude? I thought the ^ meant not?
Originally posted by leftism+20 February 2004 - 10:17--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (leftism @ 20 February 2004 - 10:17)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn
/^[a-zA-Z]/ Matches if the line starts with any letter
You sure dude? I thought the ^ meant not?[/b][/quote]
I am sure.
You are welcomed to prove me otherwise. Im sure vi has some handy documentation on regular expressions that you can browse. :)
Originally posted by shn+20 February 2004 - 10:27--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 20 February 2004 - 10:27)</td></tr><tr><td id='QUOTE'>
Originally posted by leftism@20 February 2004 - 10:17
<!--QuoteBegin-shn
/^[a-zA-Z]/ Matches if the line starts with any letter
You sure dude? I thought the ^ meant not?
I am sure.
You are welcomed to prove me otherwise. Im sure vi has some handy documentation on regular expressions that you can browse. :) [/b][/quote]
I wouldn't mess with shn, she'll take you down, right down to china town!
:lol: :lol:
Just kidding
New question:
Give a command to display info about your cpu.
Originally posted by LSA+20 February 2004 - 10:34--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 20 February 2004 - 10:34)</td></tr><tr><td id='QUOTE'>
Originally posted by shn+20 February 2004 - 10:27--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 20 February 2004 - 10:27)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-leftism@20 February 2004 - 10:17
<!--QuoteBegin-shn
/^[a-zA-Z]/ Matches if the line starts with any letter
You sure dude? I thought the ^ meant not?
I am sure.
You are welcomed to prove me otherwise. Im sure vi has some handy documentation on regular expressions that you can browse. :) [/b][/quote]
I wouldn't mess with shn, she'll take you down, right down to china town!
:lol: :lol:
Just kidding
New question:
Give a command to display info about your cpu.[/b][/quote]
I only went by my use of vi. I have dealt with regular expressions but am no expert in them as they are a bit tricky to specify, but my answer was purely off the top of my head. If I am wrong I would like to know because this is not a competition..
:)
leftism
02-20-2004, 04:44 PM
hehe I never could resist a challenge :D
[^] Matches anything not enclosed after the not character.
Example
Ver[^1-9] Matches Ver followed by any non digit.
source (http://www.cab.u-szeged.hu/local/linux/doc/lug/node175.html)
edit:
Originally posted by shn
I only went by my use of vi. I have dealt with regular expressions but am no expert in them as they are a bit tricky to specify, but my answer was purely off the top of my head. If I am wrong I would like to know because this is not a competition..
Thats cool :)
I dont have a problem with being wrong sometimes or speaking to people who know more than me. (Although I try to avoid the former :D)
If I did I wouldnt use linux at all :)
Then challenge we shall.
Just keep it clean :)
Originally posted by shn@20 February 2004 - 10:43
I only went by my use of vi. I have dealt with regular expressions but am no expert in them as they are a bit tricky to specify, but my answer was purely off the top of my head. If I am wrong I would like to know because this is not a competition..
:)
I was just kidding http://www.mcbriens.net/liam/img/smilies/thmbup.gif
I don't know anything about vi :lol:
Originally posted by leftism+20 February 2004 - 10:44--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (leftism @ 20 February 2004 - 10:44)</td></tr><tr><td id='QUOTE'> hehe I never could resist a challenge :D
[^] Matches anything not enclosed after the not character.
Example
Ver[^1-9] Matches Ver followed by any non digit.
source (http://www.cab.u-szeged.hu/local/linux/doc/lug/node175.html)
edit:
<!--QuoteBegin-shn
I only went by my use of vi. I have dealt with regular expressions but am no expert in them as they are a bit tricky to specify, but my answer was purely off the top of my head. If I am wrong I would like to know because this is not a competition..
Thats cool :)
I dont have a problem with being wrong sometimes or speaking to people who know more than me. (Although I try to avoid the former :D)
If I did I wouldnt use linux at all :) [/b][/quote]
To be honest our Linux community here is relatively small. Welcome aboard :rolleyes:
Originally posted by shn@20 February 2004 - 11:15
To be honest our Linux community here is relatively small. Welcome aboard :rolleyes:
Yeah welcome to linux world!
---
Is anyone going to answer this, its really easy!
Give a command to display info about your cpu.
Originally posted by LSA+20 February 2004 - 11:20--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 20 February 2004 - 11:20)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@20 February 2004 - 11:15
To be honest our Linux community here is relatively small. Welcome aboard :rolleyes:
Yeah welcome to linux world!
---
Is anyone going to answer this, its really easy!
Give a command to display info about your cpu.[/b][/quote]
uname
What is the command to display the content of your enviormental variables path? :)
Originally posted by LSA@20 February 2004 - 11:48
cat $PATH
Right?
I generally use echo $PATH :)
How do you find out information regarding a particular rpm that's installed?
I take break now :P
rpm -qi name
I'll think of a question and edit this post im running out :P
EDIT:
Ok, why does ext2 / ext3 not need defragmenting?
Is that one too hard? :lol:
What does GTK stand for?
4play
02-21-2004, 02:51 AM
i though gtk stood for gnome toolkit but its the gimp toolkit :o
name two bits of software that i can use to cluster linux boxes?
leftism
02-21-2004, 02:58 AM
Originally posted by 4play
name two bits of software that i can use to cluster linux boxes?
I can only manage one :)
Beowulf.
4play
02-21-2004, 03:02 AM
mosix (http://www.mosix.org/) is also pretty cool if you have a few machines on your network.
Damn... I leave for a day and look where this thread's gone. :P
Easy question: what's the distro that fits on one floppy disk, and what is the glaring absence in it?
4play
02-21-2004, 03:10 AM
there are loads that fit on a floppy. if its menutos your talking about its not linux its all written in assembly unlike the linux kernel.
Yes, I was talking about Menutos, which is missing a file manager. :( Crappy question, but 4play gets a point.
4play
02-21-2004, 03:26 AM
what is cvs ?
Content verification system?
I'm looking like a real fool here... :D
4play
02-21-2004, 03:30 AM
lol that is right as well i suppose :lol:
cvs = Concurrent Versions System
anyway night got work in 4 hours better get some sleep.
What is the sound card called in /dev?
Not sure if I worded that right...:lol:
Come on this is the best thread here!
Where is everyone? :01:
leftism
02-22-2004, 09:51 AM
Originally posted by LSA
What is the sound card called in /dev?
/dev/dsp ?
either that or /dev/audio. (hedges bets :D)
Yeah, thats the one I was thinking of.
Now you think of a question, i'm running low.
leftism
02-22-2004, 05:55 PM
What is the four letter acronym commonly used to refer to a popular setup used to produce dynamic web content, and what does each letter stand for?
DHTML?
Dynamic Hyper Text Markup Language?
If that's right I don't see what it has to do with linux...
That was just a guess :unsure:
leftism
02-22-2004, 06:27 PM
Sorry dude, its LAMP
Linux, Apache, MySQL, PHP.
Im all out of questions for the moment, someone else will have to take over :)
Hey! Thats what I was going to put too!
:frusty:
DHTML is 5 letters... :frusty:
:rolleyes:
ravendark
02-24-2004, 10:37 AM
ok this should be easy ( its late and im tired ) the question i have is really in to parts
most should know by now the pention linux developers have for acronyms to name there software, so my question is
what does SANE stand for and since you will most likely be using a TWAIN scanner with it, what does TWAIN stand for.
Originally posted by ravendark@24 February 2004 - 04:37
ok this should be easy ( its late and im tired ) the question i have is really in to parts
most should know by now the pention linux developers have for acronyms to name there software, so my question is
what does SANE stand for and since you will most likely be using a TWAIN scanner with it, what does TWAIN stand for.
scanner access now easy
And TWAIN does not mean anything. It is not an acronym :)
:w00t:
Linux Quiz is back!
Question:
What does Tux stand for?
ravendark
02-25-2004, 12:52 AM
Originally posted by shn+24 February 2004 - 15:02--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 24 February 2004 - 15:02)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-ravendark@24 February 2004 - 04:37
ok this should be easy ( its late and im tired ) the question i have is really in to parts
most should know by now the pention linux developers have for acronyms to name there software, so my question is
what does SANE stand for and since you will most likely be using a TWAIN scanner with it, what does TWAIN stand for.
scanner access now easy
And TWAIN does not mean anything. It is not an acronym :) [/b][/quote]
i grant you that its not a true acronym, but the developer couldnt think of an interesting name for the project, so he named it, and i kid you not,
Thing
Without
An
Interesting
Name
just thought it would give someone a chuckle
Originally posted by ravendark+24 February 2004 - 18:52--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (ravendark @ 24 February 2004 - 18:52)</td></tr><tr><td id='QUOTE'>
Originally posted by shn@24 February 2004 - 15:02
<!--QuoteBegin-ravendark@24 February 2004 - 04:37
ok this should be easy ( its late and im tired ) the question i have is really in to parts
most should know by now the pention linux developers have for acronyms to name there software, so my question is
what does SANE stand for and since you will most likely be using a TWAIN scanner with it, what does TWAIN stand for.
scanner access now easy
And TWAIN does not mean anything. It is not an acronym :)
i grant you that its not a true acronym, but the developer couldnt think of an interesting name for the project, so he named it, and i kid you not,
Thing
Without
An
Interesting
Name
just thought it would give someone a chuckle[/b][/quote]
The word TWAIN is from Kipling's "The Ballad of East and West" - "...and never the twain shall meet...", reflecting the difficulty, at the time, of connecting scanners and personal computers. It was up-cased to TWAIN to make it more distinctive. This led people to believe it was an acronym, and then to a contest to come up with an expansion. None were selected, but the entry "Technology Without An Interesting Name" continues to haunt the standard. "
What is TWAIN an acronym for? (http://www.twain.org/faq.htm#What%20is%20TWAIN%20an%20acronym%20for)
If you want to call it that. I suppose it makes a a little more sense :)
shn owns another fool again... :P
Tux stands for Torvald's UniX, which was originally a joke, then stuck.
Question: Write a shell script for csh which recreates the antiquated and lame "ping of death."
ravendark
02-25-2004, 07:31 AM
Originally posted by shn@24 February 2004 - 21:10
The word TWAIN is from Kipling's "The Ballad of East and West" - "...and never the twain shall meet...", reflecting the difficulty, at the time, of connecting scanners and personal computers. It was up-cased to TWAIN to make it more distinctive. This led people to believe it was an acronym, and then to a contest to come up with an expansion. None were selected, but the entry "Technology Without An Interesting Name" continues to haunt the standard. "
What is TWAIN an acronym for? (http://www.twain.org/faq.htm#What%20is%20TWAIN%20an%20acronym%20for)
If you want to call it that. I suppose it makes a a little more sense :)
/takes bite of hummble pie
i stand corrected
/takes another bite
but ill find something interesting, you have my word.
declare a variable that is defined to hold 256 char and then copy the input into your variable with strcpy()
Originally posted by shn@29 February 2004 - 03:58
declare a variable that is defined to hold 256 char and then copy the input into your variable with strcpy()
:o
m4d skillz!
---------
Question:
How are .bash_profile, .bash_login and .bashrc different?
leftism
02-29-2004, 05:06 PM
Originally posted by shn
declare a variable that is defined to hold 256 char and then copy the input into your variable with strcpy()
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
char var[256];
strcpy(var, argv[1]);
}
Buffer overflow time methinks :D
Code an exploit to create a shell by overflowing the stack when strcpy executes! (j/k)
cselik
02-29-2004, 07:56 PM
Originally posted by LSA@29 February 2004 - 15:38
Question:
How are .bash_profile, .bash_login and .bashrc different?
When bash is invoked as an interactive login shell, it looks for: .bash_profile, .bash_login and .profile in that order. When bash is invoked as an non-login shell, it looks for .bashrc in the user's home directory.
q:
what progs r u gona use to share files with windows? i mean thru[My Network Places]?
Samba?
Question:
Give a command to find the current run level.
cselik
03-01-2004, 01:57 AM
Originally posted by LSA@29 February 2004 - 23:16
Samba?
Question:
Give a command to find the current run level.
Samba is correct! :lol: still might need a fancy Web Administration interface / Tool :D
i think if u type runlevel you should be able to get some info, but only 4 root :ph34r:
my q:
what command would u type to count from 5 to 10 incrementing by 0.2 at a time?[script=half points]
'runlevel' works if you have /sbin in your path, so you get a point http://www.mcbriens.net/liam/img/smilies/thmbup.gif
Originally posted by cselik+29 February 2004 - 19:57--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (cselik @ 29 February 2004 - 19:57)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-LSA@29 February 2004 - 23:16
Samba?
Question:
Give a command to find the current run level.
Samba is correct! :lol: still might need a fancy Web Administration interface / Tool :D
[/b][/quote]
http://www.webmin.com/standard.html
In Slackware (:w00t:), what script prepares the system before going into your desired runlevel?
Bump!
Don't you die on me, Linux Quiz!
http://www.ralphradford.com/corp/images/defibrillator.jpg
Originally posted by LSA@13 March 2004 - 11:22
Don't you die on me, Linux Quiz!
http://www.ralphradford.com/corp/images/defibrillator.jpg
Linux Quiz is for questions and answers.
Not photos. :)
Originally posted by shn@13 March 2004 - 11:28
Linux Quiz is for questions and answers.
Not photos. :)
Ok then the answer is rc.S!! You n00bs!!! Just kidding :-"
Question:
What is the command to save and exit vi. Come on, thats easy...
:wq
which field of the /etc/passwd file holds the passwords for users? :)
Depends if you have shadow on or not (Right?)
I was reading about this a few days ago. Mine looks like this (in shadow, that isn't my real password, I changed a few of the letters :P)
It's this part I think (encrypted)
loren:$1$B81tJtU7$lPItd7ft/HZm02kMGHTdh1:12368:-1:99999:-1:::
I think that's right but am not sure.
Originally posted by LSA@13 March 2004 - 12:57
Depends if you have shadow on or not (Right?)
I was reading about this a few days ago. Mine looks like this (in shadow, that isn't my real password, I changed a few of the letters :P)
It's this part I think (encrypted)
loren:$1$B81tJtU7$lPItd7ft/HZm02kMGHTdh1:12368:-1:99999:-1:::
I think that's right but am not sure.
The correct answer is:
the second field :)
Originally posted by shn@13 March 2004 - 13:02
The correct answer is:
the second field :)
Ohhh, you got me there :lol:
What configuration file does init look to?
Your question was a bit indecisive but I'll say /etc/init.d.
Now this is the easiest of all questions in Linux Quiz ever:
From a terminal, what key would you press to see a list of all your apps installed.
And since youll pretty much be stuck at a screen listing over 2000 programs, what key/keys would you press to exit. :)
Originally posted by shn@13 March 2004 - 20:25
Your question was a bit indecisive but I'll say /etc/init.d.
Now this is the easiest of all questions in Linux Quiz ever:
From a terminal, what key would you press to see a list of all your apps installed.
And since youll pretty much be stuck at a screen listing over 2000 programs, what key/keys would you press to exit. :)
I think it's /etc/inittab, if i'm wrong, don't 0wn me :ph34r:
------------
You can press tab, and then press 'q' or 'control+c'
------------
Question:
Update the rpm database
I dont use rpm's.
only .tgz files bud.
Slackware. :)
Originally posted by shn@13 March 2004 - 20:37
I dont use rpm's.
only .tgz files bud.
Slackware. :)
I wish I had slackware!!!
<_< :(
----
Well, it's rpm --updatedb :P
Question:
Where are kernel modules located?
It varies depending on your kernel version.
I have a /lib/modules/2.4.22 and a /lib/modules/ 2.4.24 :)
A process with a PID number of 31337 has entered runaway mode. You have tried to remove it with a standard kill command, but it will not go away. What command can you use to be assured the process will terminate?
bulio
03-14-2004, 03:19 AM
correct!!! ;)
Originally posted by shn@19 February 2004 - 19:11
You can assume an answer correct unless its not then let the person who incorrectly answered know that they are incorrect :) That way someone else can answer knowing that the question has not been answered before.
What she said. :)
Originally posted by shn@13 March 2004 - 21:11
A process with a PID number of 31337 has entered runaway mode. You have tried to remove it with a standard kill command, but it will not go away. What command can you use to be assured the process will terminate?
:gunsmile:
kill -SIGKILL 31337
Process 31337: 0wned :lol:
--------------------
Question:
Record an .iso with cdrecord on device 0,0,0
Originally posted by LSA+14 March 2004 - 09:58--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 14 March 2004 - 09:58)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@13 March 2004 - 21:11
A process with a PID number of 31337 has entered runaway mode. You have tried to remove it with a standard kill command, but it will not go away. What command can you use to be assured the process will terminate?
:gunsmile:
kill -SIGKILL 31337
Process 31337: 0wned :lol:
--------------------
Question:
Record an .iso with cdrecord on device 0,0,0[/b][/quote]
Incorrect.
The correct answer is:
kill -9 31337
Terminates a process indefinately.
Quite frankly I suggest you confer with your man files (http://rootr.net/man?parameter=kill&mode=man) :)
Is -SIGKILL a switch for 'killall'?
Hmm a little confused :">
Originally posted by LSA@14 March 2004 - 16:44
Is -SIGKILL a switch for 'killall'?
Hmm a little confused :">
killall what?
Your trying terminate "one" process and that is 31337. Without shutting down the whole system dude.
You might as well press the power button and turn the computer off if you can't do that.
Go to your terminal and "man kill" read it............learn it. Also the link I posted was from an official man file.
The –9 signal is the most lethal, and will terminate the process immediately. All other signals are weaker than –9 :)
killall - kill a process by name
http://www.rt.com/man/killall.1.html
I just got confused between the 2 :"> :stupid:
------------------
Question:
When fsck finds a unreferenced file where does it put it?
Originally posted by LSA@14 March 2004 - 17:09
killall - kill a process by name
http://www.rt.com/man/killall.1.html
I just got confused between the 2 :"> :stupid:
------------------
Question:
Where fsck finds a unreferenced file where does it put it?
The thing is.........when your on a "real" linux box, you can't be "confused." You can't just go around terminating processes.
You cant just go and kill processes because your not the only one on the box that has a process.
There could be an apache process, a mysql, etc. and what about the other user's processes?
The key is to terminate that "one" little pest of a process that you really do not give a danm about so therefore termination is bliss.
You have been terminated. :)
Originally posted by shn@14 March 2004 - 17:17
The thing is.........when your on a "real" linux box, you can't be "confused." You can't just go around terminating processes.
You cant just go and kill processes because your not the only one on the box that has a process.
There could be an apache process, a mysql, etc. and what about the other user's processes?
The key is to terminate that "one" little pest of a process that you really do not give a danm about so therefore termination is bliss.
You have been terminated. :)
I know :lol: I just got confused between the 2 commands...:lol:
Please don't terminate me shn! :(
:lol:
----------
Ya know the answer or are you a n00b? Just kidding :-" :)
Is Linux Quiz over?
Anyone still want to play?
bulio
03-21-2004, 12:59 AM
I still wanna play
:w00t: Ok, ask/answer a question.
:lol: Nobody's answered mine yet. :P
Originally posted by haxor41789@21 March 2004 - 02:27
:lol: Nobody's answered mine yet. :P
What's the question? I went back 3 pages (40 posts a page) and couldn't find anything.
Is it that one about making a shell script for ping of death?
bulio
03-23-2004, 01:57 AM
my questions:
1) in which programming language is most of GNU/Linux written?
Pascal
C/C++
Lisp
don't know
2)Which of these programming languages do not exist for GNU/Linux?
Fortran, Lisp, Pascal, Modula-2, ADA
Java, JavaScript
Visual Basic, Visual C, Visual Java
don't know
Originally posted by bulio@22 March 2004 - 19:57
my questions:
1) in which programming language is most of GNU/Linux written?
Pascal
C/C++
Lisp
don't know
2)Which of these programming languages do not exist for GNU/Linux?
Fortran, Lisp, Pascal, Modula-2, ADA
Java, JavaScript
Visual Basic, Visual C, Visual Java
don't know
Your first one was already asked, its C/C++
The second one is vb I think.
@Haxor - That's a hard one! /me searchs google :P
bulio
03-23-2004, 01:28 PM
Originally posted by LSA+23 March 2004 - 03:02--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 23 March 2004 - 03:02)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-bulio@22 March 2004 - 19:57
my questions:
1) in which programming language is most of GNU/Linux written?
Pascal
C/C++
Lisp
don't know
2)Which of these programming languages do not exist for GNU/Linux?
Fortran, Lisp, Pascal, Modula-2, ADA
Java, JavaScript
Visual Basic, Visual C, Visual Java
don't know
Your first one was already asked, its C/C++
The second one is vb I think.
@Haxor - That's a hard one! /me searchs google :P [/b][/quote]
your right, it's vb, 'cause vb is designed by micro$oft <_<
bulio
03-23-2004, 11:14 PM
Which kernel was created in the GNU project?
BSD
HURD
Linux
Linux
@Haxor - That question is way to hard, IMO. :P Can't even find anything on google. :huh:
-----------
Question:
Name at least 4 linux IT certifications.
bulio
03-24-2004, 01:09 AM
nope it's hurd ;) ;)
bulio
03-24-2004, 01:12 AM
1)SAIR/GNU Linux Certified Administrator
2)Linux Professional Institute Certification
3)Linux Professional Institute Certified Level 2
4)Linux System Administration
there ya go ;)
Originally posted by bulio@23 March 2004 - 19:12
4)Linux System Administration
= LSA = ME B) :w00t:
Just kidding
Need another question now, bulio
@bulio.
I liked "Linux nut" better. :(
bulio
03-24-2004, 01:24 AM
this is just temporary dont worry :lol:
Question:
Which file stores the password in Linux?
/etc/passwd
/etc/shadow
/etc/password
2)
What is the command to unzip file.gz?
$gunzip file.gz
$unzip file.gz
$bunzip2 file.gz
Originally posted by shn@23 March 2004 - 19:22
@bulio.
I liked "Linux nut" better. :(
Me too, but shn....pipe it to /dev/null, ok? :lol:
Just kidding! :ph34r:
------------
/etc/passwd if shadow is on it is in /etc/shadow
gunzip file.gz
EDIT: How do you change your default runlevel?
bulio
03-24-2004, 01:27 AM
both right! i'll post a question for time being
Which one of the below file type is not played by XMMS application?
MP3
Mpeg1
real media
Real media I think, not sure though
Edited, btw
bulio
03-24-2004, 01:35 AM
yours was correct, how bout my answer:
type: /etc/rc.d/rc<x>.d (x is runlevel number)
bulio
03-24-2004, 01:36 AM
which application can be used to open .ppt files in Linux?
Open office
Abi word
Acro read
Originally posted by bulio@23 March 2004 - 19:35
yours was correct, how bout my answer:
type: /etc/rc.d/rc<x>.d (x is runlevel number)
No, you have to edit /etc/inittab and change this line
id:5:initdefault:
Change the 5 to whatever runlevel you want to make default
--------------
Open office - impress
--------------
Which bash config file would you edit if you wanted to change the way your prompt looked?
Originally posted by LSA+23 March 2004 - 19:40--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 23 March 2004 - 19:40)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-bulio@23 March 2004 - 19:35
yours was correct, how bout my answer:
type: /etc/rc.d/rc<x>.d (x is runlevel number)
No, you have to edit /etc/inittab and change this line
id:5:initdefault:
Change the 5 to whatever runlevel you want to make default
--------------
Open office - impress
--------------
Which bash config file would you edit if you wanted to change the way your prompt looked?[/b][/quote]
runlevel 5 is for kids. :lol:
pipe it to Windows and a Live cd.
n/k...........(not kidding)
.bashrc :)
Originally posted by shn@23 March 2004 - 19:46
runlevel 5 is for kids. :lol:
pipe it to Windows and a Live cd.
n/k...........(not kidding)
.bashrc :)
I only use it because runlevel 3 messes up my fonts in X. :huh:
Hey I don't even have windows anymore so :P :lol:
Just fedora...I am still looking for slackware (56l) | windows and a live cd
[loren@loren]$ I only use it because runlevel 3 messes up my fonts in X. :huh:
bash: I: command not found
[loren@loren]$
[loren@loren]$ Hey I don't even have windows anymore so :P :lol:
>
> Just fedora...I am [i]still[/i] looking for slackware (56k) | windows and a live cd
Errm, what now? :unsure:
bulio
03-24-2004, 01:58 AM
Which of the following devices would be the first SCSI hard disk on a Linux system?
a. /dev/sd0
b. /dev/sd1
c. /dev/sda
d. /dev/sdb
A process with a PID number of 1777 has entered runaway mode. You have tried to remove it with a standard kill command, but it will not go away. What command can you use to be assured the process will terminate?
a. kill –NOW 1777
b. kill –HUP 1777
c. kill –15 1777
d. kill –9 1777
Originally posted by bulio@23 March 2004 - 19:58
Which of the following devices would be the first SCSI hard disk on a Linux system?
a. /dev/sd0
b. /dev/sd1
c. /dev/sda
d. /dev/sdb
A process with a PID number of 1777 has entered runaway mode. You have tried to remove it with a standard kill command, but it will not go away. What command can you use to be assured the process will terminate?
a. kill –NOW 1777
b. kill –HUP 1777
c. kill –15 1777
d. kill –9 1777
/dev/sda I think
Second one is...hmmm let me think!
:lol:
kill -9 1777
Right, shn? :lol:
That has been asked before too.
------------
Thinking of question, hold your horses :01:
bulio
03-24-2004, 02:03 AM
right on both! now post me a question! :lol:
@LSa -- Which command can be used to rearrange the order of jobs in a spooling queue awaiting printing?
a. lpc
b. lpstat
c. lpq
d. lpr
@bulio ;)
How do you change your default shell?
Originally posted by shn@23 March 2004 - 20:06
@LSa -- Which command can be used to rearrange the order of jobs in a spooling queue awaiting printing?
a. lpc
b. lpstat
c. lpq
d. lpr
:ph34r: lpstat :unsure:
Originally posted by LSA+23 March 2004 - 20:09--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 23 March 2004 - 20:09)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@23 March 2004 - 20:06
@LSa -- Which command can be used to rearrange the order of jobs in a spooling queue awaiting printing?
a. lpc
b. lpstat
c. lpq
d. lpr
:ph34r: lpstat :unsure:[/b][/quote]
Wrong.
Maybe bulio knows the answer.................
ck-uk
03-24-2004, 02:16 AM
no hidin in linux land
i'll talk to you tomorrow :)
Originally posted by shn@23 March 2004 - 20:12
Wrong.
Maybe bulio knows the answer.................
:"> not again!
I know what it is now though, good ol' whatis!
Originally posted by ck-uk@23 March 2004 - 20:16
no hidin in linux land
i'll talk to you tomorrow :)
Yeah, I can't hide my true passion. :rolleyes:
We'll talk tommorow. I promise. :)
bulio
03-24-2004, 01:42 PM
Originally posted by shn+24 March 2004 - 02:12--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 24 March 2004 - 02:12)</td></tr><tr><td id='QUOTE'>
Originally posted by LSA@23 March 2004 - 20:09
<!--QuoteBegin-shn@23 March 2004 - 20:06
@LSa -- Which command can be used to rearrange the order of jobs in a spooling queue awaiting printing?
a. lpc
b. lpstat
c. lpq
d. lpr
:ph34r: lpstat :unsure:
Wrong.
Maybe bulio knows the answer................. [/b][/quote]
lpr :lol:
ck-uk
03-24-2004, 02:34 PM
Originally posted by shn+24 March 2004 - 01:18--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 24 March 2004 - 01:18)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-ck-uk@23 March 2004 - 20:16
no hidin in linux land
i'll talk to you tomorrow :)
Yeah, I can't hide my true passion. :rolleyes:
We'll talk tommorow. I promise. :) [/b][/quote]
no worries shn you take your time.
Gone anyway.I havn't run the dog in 2 days,the weathers pissy. :)
Ok new question
:w00t:
How do you change your default shell?
ck-uk
03-24-2004, 10:42 PM
Shn r u hidin again :(
Originally posted by LSA@24 March 2004 - 16:24
Ok new question
:w00t:
How do you change your default shell?
Even though you edited that, I'm still going to post this because Linux Quiz is for learning after all right?
Your proposed answer formally debated before your edit.
DESCRIPTION
lpq shows the current print queue status on the named printer. Jobs
queued on the default destination will be shown if no printer or class
is specified on the command-line.
The interval option allows you to continuously report the jobs in the
queue until the queue is empty; the list of jobs is show one every
interval seconds.......................
The correct answer is lpc
NAME
lpc - line printer control program
SYNOPSIS
lpc [command [argument ...]]
DESCRIPTION
lpc is used by the system administrator to control the operation of the
line printer system. For each line printer configured in /etc/printcap,
lpc may be used to:
o disable or enable a printer,
o disable or enable a printer's spooling queue,
o rearrange the order of jobs in a spooling queue,
o find the status of printers, and their associated spooling
queues and printer daemons...................
Source (http://rootr.net/man/man/lpc/8) :)
ck-uk
03-24-2004, 10:48 PM
:D :)
Originally posted by shn+24 March 2004 - 16:43--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 24 March 2004 - 16:43)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-LSA@24 March 2004 - 16:24
Ok new question
:w00t:
How do you change your default shell?
Even though you edited that, I'm still going to post this because Linux Quiz is for learning after all right?
Your proposed answer formally debated before your edit.
DESCRIPTION
lpq shows the current print queue status on the named printer. Jobs
queued on the default destination will be shown if no printer or class
is specified on the command-line.
The interval option allows you to continuously report the jobs in the
queue until the queue is empty; the list of jobs is show one every
interval seconds.......................
The correct answer is lpc
NAME
lpc - line printer control program
SYNOPSIS
lpc [command [argument ...]]
DESCRIPTION
lpc is used by the system administrator to control the operation of the
line printer system. For each line printer configured in /etc/printcap,
lpc may be used to:
o disable or enable a printer,
o disable or enable a printer's spooling queue,
o rearrange the order of jobs in a spooling queue,
o find the status of printers, and their associated spooling
queues and printer daemons...................
Source (http://rootr.net/man/man/lpc/8) :) [/b][/quote]
Thanks, I was wondering about that.
I looked at the man pages after I posted because I wasn't sure, but both pages said stuff about queue so I just took it out. :">
New question, what config file lists the modules to be loaded at startup?
:lol: A valid answer to the question posed by me on page three would be:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#ifdef REALLY_RAW
#define FIX(x) htons(x)
#else
#define FIX(x) (x)
#endif
int main(int argc, char **argv)
{
int s;
char buf[1500];
struct ip *ip = (struct ip *)buf;
struct icmp *icmp = (struct icmp *)(ip + 1);
struct hostent *hp;
struct sockaddr_in dst;
int offset;
int on = 1;
bzero(buf, sizseof buf);
if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_IP)) < 0)
{
perror("socket");
exit(1);
}
if (setsockopts(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0
{
perror("IP_HDRINCL");
exit(1);
}
if (argc != 2)
{
fprintf(stderr, "usage: %s hostname\n:, argv[0]);
exit(1);
}
if ((hp = getbyhostname(argv[1])) == NULL)
{
if ((ip->ip_dst.s_addr = inet_addr(argv[1])) == -1)
{
fprintf9stderr, "%s: unknown host\n", argv[1]);
}
}
else
{
bcopy(hp->h_addr_list[0], &ip->ip_dst.s_addr, hp->h_length;
}
printf("Sending to %s\n", inet_ntoa(ip->ip_dst));
ip->ip_v = 4;
ip->ip_hl = sizeof *ip >> 2;
ip->ip_tos = 0;
ip->ip_len = FIX(sizeof buf);
ip->ip_id = htons(4321);
ip->ip_off = FIX(0);
ip->ip_ttl = 255;
ip->ip_p = 1;
ip->ip_sum = 0;
ip->ip_src.s_addr = 0;
dst.sin_addr = ip->ip_dst;
dst.sin_family = AF_INET;
icmp->icmp_type = ICMP_ECHO;
icmp->icmp_code = 0;
icmp->icmp_cksum = htons(~(ICMP_ECHO << 8));
for (offset = 0; offset <65536; offset += (sizeof buf - sizeof *ip))
{
ip->ip_off = FIX(offset >> 3);
if (offset < 65120)
ip->ip_off l= FIX(IP_MF);
else ip->ip_len = FIX(418);
if (sendto(s, buf, sizeof buf, 0, (struct sockaddr *)&dst, sizeof dst) < 0)
{
fprintf(stderr, "offset %d: ", offset);
perror("sendto");
}
if (offset == 0)
{
icmp->icmp_type = 0;
icmp->icmp_code = 0;
icmp->icmp_cksum = 0;
}
}
}
:)
Originally posted by haxor41789@24 March 2004 - 19:41
:lol: A valid answer to the question posed by me on page three would be:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#ifdef REALLY_RAW
#define FIX(x) htons(x)
#else
#define FIX(x) (x)
#endif
int main(int argc, char **argv)
{
int s;
char buf[1500];
struct ip *ip = (struct ip *)buf;
struct icmp *icmp = (struct icmp *)(ip + 1);
struct hostent *hp;
struct sockaddr_in dst;
int offset;
int on = 1;
bzero(buf, sizseof buf);
if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_IP)) < 0)
{
perror("socket");
exit(1);
}
if (setsockopts(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0
{
perror("IP_HDRINCL");
exit(1);
}
if (argc != 2)
{
fprintf(stderr, "usage: %s hostname\n:, argv[0]);
exit(1);
}
if ((hp = getbyhostname(argv[1])) == NULL)
{
if ((ip->ip_dst.s_addr = inet_addr(argv[1])) == -1)
{
fprintf9stderr, "%s: unknown host\n", argv[1]);
}
}
else
{
bcopy(hp->h_addr_list[0], &ip->ip_dst.s_addr, hp->h_length;
}
printf("Sending to %s\n", inet_ntoa(ip->ip_dst));
ip->ip_v = 4;
ip->ip_hl = sizeof *ip >> 2;
ip->ip_tos = 0;
ip->ip_len = FIX(sizeof buf);
ip->ip_id = htons(4321);
ip->ip_off = FIX(0);
ip->ip_ttl = 255;
ip->ip_p = 1;
ip->ip_sum = 0;
ip->ip_src.s_addr = 0;
dst.sin_addr = ip->ip_dst;
dst.sin_family = AF_INET;
icmp->icmp_type = ICMP_ECHO;
icmp->icmp_code = 0;
icmp->icmp_cksum = htons(~(ICMP_ECHO << 8));
for (offset = 0; offset <65536; offset += (sizeof buf - sizeof *ip))
{
ip->ip_off = FIX(offset >> 3);
if (offset < 65120)
ip->ip_off l= FIX(IP_MF);
else ip->ip_len = FIX(418);
if (sendto(s, buf, sizeof buf, 0, (struct sockaddr *)&dst, sizeof dst) < 0)
{
fprintf(stderr, "offset %d: ", offset);
perror("sendto");
}
if (offset == 0)
{
icmp->icmp_type = 0;
icmp->icmp_code = 0;
icmp->icmp_cksum = 0;
}
}
}
:)
:lol: I was just thinking that!
j/k
Originally posted by haxor41789@24 March 2004 - 19:41
:lol: A valid answer to the question posed by me on page three would be:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#ifdef REALLY_RAW
#define FIX(x) htons(x)
#else
#define FIX(x) (x)
#endif
int main(int argc, char **argv)
{
int s;
char buf[1500];
struct ip *ip = (struct ip *)buf;
struct icmp *icmp = (struct icmp *)(ip + 1);
struct hostent *hp;
struct sockaddr_in dst;
int offset;
int on = 1;
bzero(buf, sizseof buf);
if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_IP)) < 0)
{
perror("socket");
exit(1);
}
if (setsockopts(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0
{
perror("IP_HDRINCL");
exit(1);
}
if (argc != 2)
{
fprintf(stderr, "usage: %s hostname\n:, argv[0]);
exit(1);
}
if ((hp = getbyhostname(argv[1])) == NULL)
{
if ((ip->ip_dst.s_addr = inet_addr(argv[1])) == -1)
{
fprintf9stderr, "%s: unknown host\n", argv[1]);
}
}
else
{
bcopy(hp->h_addr_list[0], &ip->ip_dst.s_addr, hp->h_length;
}
printf("Sending to %s\n", inet_ntoa(ip->ip_dst));
ip->ip_v = 4;
ip->ip_hl = sizeof *ip >> 2;
ip->ip_tos = 0;
ip->ip_len = FIX(sizeof buf);
ip->ip_id = htons(4321);
ip->ip_off = FIX(0);
ip->ip_ttl = 255;
ip->ip_p = 1;
ip->ip_sum = 0;
ip->ip_src.s_addr = 0;
dst.sin_addr = ip->ip_dst;
dst.sin_family = AF_INET;
icmp->icmp_type = ICMP_ECHO;
icmp->icmp_code = 0;
icmp->icmp_cksum = htons(~(ICMP_ECHO << 8));
for (offset = 0; offset <65536; offset += (sizeof buf - sizeof *ip))
{
ip->ip_off = FIX(offset >> 3);
if (offset < 65120)
ip->ip_off l= FIX(IP_MF);
else ip->ip_len = FIX(418);
if (sendto(s, buf, sizeof buf, 0, (struct sockaddr *)&dst, sizeof dst) < 0)
{
fprintf(stderr, "offset %d: ", offset);
perror("sendto");
}
if (offset == 0)
{
icmp->icmp_type = 0;
icmp->icmp_code = 0;
icmp->icmp_cksum = 0;
}
}
}
:)
I'm ripping your code for confirmation. :lol: :)
:lol: You'll need REALLY_RAW to compile it. :P
bulio
03-25-2004, 02:55 AM
someone post me a question :ph34r:
4play
03-25-2004, 02:57 AM
@bulio what is the largest ip adress possible with ipv4 :D
:huh: 300.300.300.300. I thought everyone knew that. <_<
leftism
03-25-2004, 05:33 PM
Originally posted by haxor41789
300.300.300.300. I thought everyone knew that
Actually it's 255.255.255.255 (you cant actually use it though)
32 bits for full address, divided by 4 sections = 8 bits per section.
11111111 (binary) = 255 (decimal)
I posted 2 unanswered questions above (way above)
They are easy ones too :w00t:
BTW, does the X in my avatar still rotate? It isn't rotating for me :'(
@leftism:
It's 255.255.255.254, and the 300s were an inside joke. :P
@LSA:
Yes, it's rotating, reinstall your LZW plugin.
leftism
03-26-2004, 02:11 AM
Originally posted by haxor
It's 255.255.255.254, and the 300s were an inside joke
That'll be why I didn't get the joke then :)
255.255.255.255 is still a 'legal' (you cant use that range as its reserved) IP address, it would just be a broadcast address.
bulio
03-26-2004, 10:16 PM
Originally posted by LSA@25 March 2004 - 00:32
New question, what config file lists the modules to be loaded at startup?
/usr/src/linux/.config :huh:
Originally posted by bulio+26 March 2004 - 16:16--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (bulio @ 26 March 2004 - 16:16)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-LSA@25 March 2004 - 00:32
New question, what config file lists the modules to be loaded at startup?
/usr/src/linux/.config :huh: [/b][/quote]
Nope, anyone else want to try?
Originally posted by LSA+26 March 2004 - 16:24--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 26 March 2004 - 16:24)</td></tr><tr><td id='QUOTE'>
Originally posted by bulio@26 March 2004 - 16:16
<!--QuoteBegin-LSA@25 March 2004 - 00:32
New question, what config file lists the modules to be loaded at startup?
/usr/src/linux/.config :huh:
Nope, anyone else want to try?[/b][/quote]
/etc/modules.conf
If this a slackware question..................again. ----------> /etc/rc.d/rc.S :01:
Originally posted by shn+26 March 2004 - 16:29--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 26 March 2004 - 16:29)</td></tr><tr><td id='QUOTE'>
Originally posted by LSA@26 March 2004 - 16:24
Originally posted by bulio@26 March 2004 - 16:16
<!--QuoteBegin-LSA@25 March 2004 - 00:32
New question, what config file lists the modules to be loaded at startup?
/usr/src/linux/.config :huh:
Nope, anyone else want to try?
/etc/modules.conf
If this a slackware question..................again. ----------> /etc/rc.d/rc.S :01:[/b][/quote]
Correct
Nope not a slackware question, :lol:
BTW, That linux quiz is an imposter!
Question:
There are 5 directories and you are in directory 5.
/home/you/dir1/dir2/dir3/dir4/dir5
From a terminal, how do you move up to dir2 using the cd command.
Do Not use an absolute path.
@LSA -- changed the Link for ya. :lol:
Originally posted by shn@27 March 2004 - 13:21
Question:
There are 5 directories and you are in directory 5.
/home/you/dir1/dir2/dir3/dir4/dir5
From a terminal, how do you move up to dir2 using the cd command.
Do Not use an absolute path.
@LSA -- changed the Link for ya. :lol:
cd ../../..
I think that's correct but ATM I don't have a machine to test it on...
------------
Ok good, that link is much better than the lindows rock! :w00t:
------------
Hmm, give an example of 'redirecting output'
I hope I worded that right :huh:
Originally posted by LSA+27 March 2004 - 13:31--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 27 March 2004 - 13:31)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@27 March 2004 - 13:21
Question:
There are 5 directories and you are in directory 5.
/home/you/dir1/dir2/dir3/dir4/dir5
From a terminal, how do you move up to dir2 using the cd command.
Do Not use an absolute path.
@LSA -- changed the Link for ya. :lol:
cd ../../..
I think that's correct but ATM I don't have a machine to test it on...
------------
Ok good, that link is much better than the lindows rock! :w00t:
------------
Hmm, give an example of 'redirecting output'
I hope I worded that right :huh:[/b][/quote]
head < /.bashrc
unix@linux:~/work/tmp> ls -la > ls.out
unix@linux:~/work/tmp> ls -la
total 4
drwxr-xr-x 2 unix users 72 2004-03-27 13:19 .
drwxr-xr-x 3 unix users 72 2004-03-27 13:17 ..
-rw-r--r-- 1 unix users 200 2004-03-27 13:19 ls.out
unix@linux:~/work/tmp>
Looks ok.
I can't think of a question, I just "woke up"......long story
Ok heres one:
Where is the file that stores your iptables configuration?
Here is another one then...
How do you find out which config file X is using?
Browse the internet from a terminal................any site.
Originally posted by shn@1 April 2004 - 03:43
Browse the internet from a terminal................any site.
I'm not sure i'm understanding the question right but I think this is what you mean.
lynx [site]
links [site]
elinks ..... etc
Is that what you meant? I'm not sure.
How do you switch from one virtual console from another?
Good boy.
Now switch Virtual consoles while in X.
Originally posted by shn@1 April 2004 - 16:44
Good boy.
Now switch Virtual consoles while in X.
Ctrl+Alt+[Funtion Key]
I gotta go rake leaves i'll be back in an hour probably (if anyone's home)
Originally posted by LSA+1 April 2004 - 16:47--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 1 April 2004 - 16:47)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-shn@1 April 2004 - 16:44
Good boy.
Now switch Virtual consoles while in X.
Ctrl+Alt+[Funtion Key]
I gotta go rake leaves i'll be back in an hour probably (if anyone's home)[/b][/quote]
Correct Sir
Ain't Google just Grande. :)
Originally posted by shn+1 April 2004 - 16:50--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 1 April 2004 - 16:50)</td></tr><tr><td id='QUOTE'>
Originally posted by LSA@1 April 2004 - 16:47
<!--QuoteBegin-shn@1 April 2004 - 16:44
Good boy.
Now switch Virtual consoles while in X.
Ctrl+Alt+[Funtion Key]
I gotta go rake leaves i'll be back in an hour probably (if anyone's home)
Correct Sir
Ain't Google just Grande. :) [/b][/quote]
:lol: I didn't use google :P
Originally posted by leftism@20 February 2004 - 04:32
The questions seem to have dried up so..... :)
If you have these files in your home directory...
file.c
main.c
defines.h
program.tar.gz
index.html
How can you delete the C source files and the header file only, using just one command?
I was reading about bash wildcards and found the answer to this question.
rm *[!ch]
Is that right?
Originally posted by LSA@3 April 2004 - 16:28
When is epoch?
I hate to do this, but do you run Debian?
And I could have swarn your initial question was:
What is epoch and not When is.
But I suppose since I see no sign of an edit then I am wrong. Or am I?
http://community.the-underdogs.org/smiley/happy/tails.gif
Barbie
04-04-2004, 05:45 AM
Originally posted by LSA@3 April 2004 - 17:28
When is epoch?
1970-01-01 00:00:00 UTC
Originally posted by shn+3 April 2004 - 22:14--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (shn @ 3 April 2004 - 22:14)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-LSA@3 April 2004 - 16:28
When is epoch?
I hate to do this, but do you run Debian?
And I could have swarn your initial question was:
What is epoch and not When is.
But I suppose since I see no sign of an edit then I am wrong. Or am I?
http://community.the-underdogs.org/smiley/happy/tails.gif [/b][/quote]
Do I run Debian? No, why do you ask that? :huh:
My initial question was 'when is epoch', but 'what is epoch' would have been a better question.
Barbie gets a point.
I got a few unanswered questions above, if anyone wants one.
Originally posted by LSA+4 April 2004 - 09:04--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (LSA @ 4 April 2004 - 09:04)</td></tr><tr><td id='QUOTE'>
Originally posted by shn@3 April 2004 - 22:14
<!--QuoteBegin-LSA@3 April 2004 - 16:28
When is epoch?
I hate to do this, but do you run Debian?
And I could have swarn your initial question was:
What is epoch and not When is.
But I suppose since I see no sign of an edit then I am wrong. Or am I?
http://community.the-underdogs.org/smiley/happy/tails.gif
Do I run Debian? No, why do you ask that? :huh:
My initial question was 'when is epoch', but 'what is epoch' would have been a better question.
Barbie gets a point.
I got a few unanswered questions above, if anyone wants one.[/b][/quote]
Because I had a Debian question for you. But I guess since you don't run it and you keep saying you wish you had slackware, then you'll have to settle for this fedora one. :)
Bring the whole system up2date with yum. Should be one single command.
I ordered slackware yesterday :w00t:
I think it's 'yum upgrade'
leftism
04-06-2004, 12:52 AM
Originally posted by leftism+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (leftism)</td></tr><tr><td id='QUOTE'>
The questions seem to have dried up so.....
If you have these files in your home directory...
file.c
main.c
defines.h
program.tar.gz
index.html
How can you delete the C source files and the header file only, using just one command?
<!--QuoteBegin-LSA
I was reading about bash wildcards and found the answer to this question.
rm *[!ch]
Is that right?
[/b][/quote]
Nearly :)
[!ch] means "not c or h" so you'd be deleting every file that didn't end in c or h.
rm *.[ch] is the correct answer.
You could also do rm *.? because ? means one character only.
Afronaut
04-06-2004, 02:01 AM
This thread is now Closed by Request of the author.
Please, someone start a new thread called Linux Quiz v.2
if needed.
I sure like to read this section too and I know I didnt post in this thread
but that is because knowhow on Linux is somewhat limited, im a n00b.
:)
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.