LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-27-2002, 10:47 AM   #31
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64

Wow, that's cool.

I know I should know, but could someone either kindly point me to a thread/webpage on info of what in INODE is, and it's significance to me or anyone.

Thanks
 
Old 08-27-2002, 03:51 PM   #32
Goatdemon
Member
 
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398

Rep: Reputation: 30
hey heres a potential tip if anyone can give it to me. te he.

id like to hit something like CTRL+* in a terminal and have it execule a command like
./configure &&
make &&
make install &&
make clean

can i do this? and thanks again grand masterc for the && tip.
 
Old 08-27-2002, 04:31 PM   #33
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
...

...

Last edited by unSpawn; 08-27-2002 at 04:36 PM.
 
Old 08-27-2002, 04:35 PM   #34
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
"In a UNIX-based operating system, an inode is a computer-stored description of an individual file in a UNIX file system." (whatis.techtarget.com) cuz typing `whatis inode` usually won't work :-]

The CTRL+<key> is a keymap thingie, just like the ca rule in inittab you can define a ley combo to do this, tho I would advice against it unless you I) compile and install everywhere or II)are sure you won't *ever* use that key for something else...
What I do when I have routine business I usually set it up in a function, like
compileNow() { commands; commands; commands; }
now if you're busy incorporating this will also work in your shell's resourcefile like .bashrc:

someSet() {
case "$1" in
on)
alias somecommand0=' command0; command1; command2'
alias somecommand1=' command3; command4; command5';;
off)
unalias somecommand0 somecommand1
esac; }
so when you call someSet on it will alias all the stuff you want, whilst off will unalias stuff.
Basically I did this to clean up while stracing some stuff read in the whole env with a gazillion aliases which ain't kewl :-]

HTH somehow

Last edited by unSpawn; 08-27-2002 at 04:37 PM.
 
Old 08-28-2002, 12:54 AM   #35
Goatdemon
Member
 
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398

Rep: Reputation: 30
i assume your responding to my question unspawn... if so i have some questions
1. what do you mean by "compile and install everywhere"
2. what do you mean by "alias and unalias stuff"
3. what does this mean "Basically I did this to clean up while stracing some stuff read in the whole env with a gazillion aliases"
4. what i gather from your post that i edit my .bashrc file, add the lines

someset() { case "$1" in
on)
alias install='./configure; make; make install; make clean'


why have somecommand0 and somecommand1, i dont understand. what does on and off do, why would i use it?

sorry for the questions but i have no idea of what the hell your talking about in your last post. thanks
 
Old 08-28-2002, 07:04 AM   #36
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Goatdemon, though not complex, it would appear that those are scripts of some sort.

I would (and I should myself ) suggest reading a bit on scripting, or programming to learn advanced functions, and possible ways to do things like this in Linux.

HTH
 
Old 08-28-2002, 08:23 AM   #37
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Soz Goat, your reply shows me conciseness ain't all...

Here's a simple example:
Open up your ~/.bashrc and add this function:
makeIt() {
#mod1:
if [ "$(echo $PWD | cut -d "/" -f 1,2,3,4)" = "/home/user/test" ]; then
./configure &&
make &&
make install &&
make clean
fi
}
and below that add the alias for it:
alias make='makeIt'

Now do ". ~/.bash_profile" to reread your shells config files and the "make" command now is an alias for what is specified under the "makeIt" function.

What I mean with "in every dir" is that this alias will work without restraints in every directory, which is probably not what you want. Say you've got a user named user, who only compiles in his /home/user/test directory, we can add (mod1).

Alias assigns a name to a command or sets of commands. Unalias removes the name the command is know by.

Stracing is tracing the execution of something (man strace).


Like masterC says, you should read up al wee bit on scripting, it comes in handy sometimes...
 
Old 08-28-2002, 02:15 PM   #38
Goatdemon
Member
 
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398

Rep: Reputation: 30
thanks and i'll read up on scripting.
 
Old 08-31-2002, 02:51 PM   #39
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 55
I've seen a lot of threads asking "how to get my dynamic IP to use in iptables, etc..."
Code:
EXTIF=eth0
IP=`/sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e s/.*://`
Where EXTIF is an interface which gets assigned dynamic IP, it differs from setup to setup, for instance for ADSL lines with PPPoE it is usually ppp0.
 
Old 09-10-2002, 01:06 AM   #40
Goatdemon
Member
 
Registered: May 2002
Location: The good 'ol USofA
Distribution: ArchLinux - Slackware 8.1
Posts: 398

Rep: Reputation: 30
isn't (make; make install) the same as doing (make && make install) ?
 
Old 09-10-2002, 05:22 AM   #41
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
No, I do not think so. make; make install would run make, and even if make faulted, and errored out, make install would still be run; whereas make && make install would actually not run make install if make faulted out. If you are running 15 different things, and just don't want to return to the computer after each one, and they are not dependent upon the other finishing, then ; would be fine.

That is my understanding anyway

Cool
 
Old 09-10-2002, 08:22 AM   #42
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Just a lil addition. A nicer way would be to dump an errormsg in between, something like: make; if [ "$?" = "1" ]; then echo "Crapped out on make process"; fi

Another tip is if you're wondering what's happening during install, before installing to do "make -n install" 2>&1 > installer.log" and less(1) the file. Gory details shown come in handy when you're making packages for instance...
 
Old 09-10-2002, 10:28 AM   #43
Calum
Member
 
Registered: Mar 2002
Location: London
Distribution: Red Hat 9
Posts: 302

Rep: Reputation: 30
Quote:
Originally posted by Thymox
Dai, forgive me for asking, but is Wales considered a seperate country by the EU yet? This is not a flame... I know that Scotland is considered a seperate country, but I thought that Wales was considered as more of a partially-autonomic principality?
fyi, scotland is NOT in any way treated as a seperate country by the EU. it, like wales, is treated as a minor english county.

For this to change, the scots will have to all vote for the scottish national party, and since they all currently vote for the english labour party, this situation is unlikely to change in any hurry.

sorry to go off topic, but i only just saw this now..
 
Old 09-11-2002, 06:49 PM   #44
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 57
Thanks for the update, Calum. I didn't know that... probably because I don't really keep up to date with politics. As far as I'm concerened, with only a couple of exceptions, most British politicians are theives, liars and conmen. But, again, this is taking things (just a little) off topic.
 
Old 09-26-2002, 10:31 PM   #45
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Original Poster
Rep: Reputation: 55
Here is another one from UGU, it is old but it is a bit funny
Code:
KILL A USER, IN THE UNIX SENSE

DISCLAIMER: UGU is not telling you to kill your users.
If you so choose to it is at your own discretion and you
are doing it at your own risk.
 
Although we all have that ONE USER...

To kill all the processes associated with a particular user
simply:

# kill -9 `ps -aef|grep jondoe |awk '{ print $2 }'`  

If you want to be a nice admin, tell him first.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wargame Hints? the_p0et Linux - Security 3 10-20-2003 12:04 AM
hints and tips bigjohn LQ Suggestions & Feedback 0 08-04-2003 02:48 PM
Slackware CUPS hints mi6 Slackware 3 06-05-2003 09:56 PM
Hints - process myquestion Programming 2 04-15-2002 08:26 PM
gcad hints ? jamaso Linux - General 0 03-02-2002 09:27 AM


All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration