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 |
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. |
...
...
|
"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 |
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 |
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 |
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... |
thanks and i'll read up on scripting.
|
I've seen a lot of threads asking "how to get my dynamic IP to use in iptables, etc..."
Code:
EXTIF=eth0 |
isn't (make; make install) the same as doing (make && make install) ?
|
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 |
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... |
Quote:
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.. |
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.
|
Here is another one from UGU, it is old but it is a bit funny
Code:
KILL A USER, IN THE UNIX SENSE |
All times are GMT -5. The time now is 08:20 AM. |