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.
Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Are you tired of winding up with multiple instances of a program of which you don't really need multiple instances? Your problems are over! Now you can just press the hot-keys or whatever shortcuts you have, without ever worrying about earlier instances. No more sore joints for having to close...
This error may happen when trying to mount a cifs/smbfs share, be it either via fstab or command line. Most people seem to either not have the problem or circumvent it by using static IPs instead of hostnames, which will work only as long as the IPs don't change. Funnily enough, it seems that for some people the problem is exactly the other way around, IPs won't work, only the hostname. Weird. This is also kind of funny/infuriating as the share will be readily accessible via konqueror, and perhaps...
I thought all it did was to create symlinks with the proper prefixes in a automated way for a given script, something that one could do manually... but apparently it does something more.
But perhaps I just did something wrong when trying to do it manually, like using the wrong runlevel folders. Or perhaps it was just the difference from priority 20 to 19 that made the difference even though I thought the key was to be a higher priority (i.e., a lower number than) than 22.
...
If you want to have a script that would do something if either one of two consequences is true, a simple way to do that would be:
Code:
if [ condition 1 ] || [ condition 2 ] ; then
if [ condition 1 ] ; then
consequences for condition 1
fi
if [ condition 2 ] ; then
consequences for condition 2
fi
consequences of either one, but happens only once, not twice
fi
...
Sometimes you move the folder to which lots of symlinks were pointing, or something to that effect, and you want to simply "edit" these symlinks rather than recreating them pointing the correct new location. That's how it can be done with one line:
Code:
find /place-where-the-null-symlinks are/ -type l | while read nullsymlink ;
do wrongpath=$(readlink "$nullsymlink") ;
right=$(echo "$wrongpath" | sed s'|/whatever/is/the/old-wrong/path|/correct-new/path|')
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.