Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"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 :-]
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.
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...
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.
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...
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..
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.