One can use grep “mystring” myfile.ext to find the lines in myfile.ext containing mystring. One could also use grep “mystring” *.ext to find mystring in all files with extension ext. Similarly, one could use grep “mystring” /directory to search for mystring in all files in the directory. What if one wants to search for mystring… Read more »
Do the following: ## see which groups you belong to groups ## safely change primary group usermod -g NewPrimaryGroup -G oldgroup1,oldgroup2,oldgroup3 my.username
I wanted to use %sysexec to execute a shell command with an asterisk (shell wildcard for globbing) in a SAS program: %sysexec cp /tmp/foo/*.txt /tmp/bar ; However, it wasn’t giving me the desired results, probably due to the /* characters as they begin a commented section in a SAS program. Also tried escaping the asterisk… Read more »
I’m back on a Mac OS X system for work (this or Windows; Linux only on servers). Found this post which offers a very nice list of apps for people like me migrating from Ubuntu.
One could mount SSHFS partitions on a Mac OS X system via OSXfuse and MacFusion to access remote files securely as if the files were stored locally. However, group permission seems to not be preserved (get a permission denied message). This post shows how one could fix it by using the -o defer_permissions options.
This is an excellent article describing how statically linked programs run on Linux.
Many laptops have their screens dimmed after returning from “suspend” and cannot get back to their original brightness. The bug hasn’t been fixed for 3 years. A fix is provided in the bug report by putting something like the following in /etc/rc.local: brt=`cat /sys/devices/virtual/backlight/acpi_video0/brightness` abrt=`cat /sys/devices/virtual/backlight/acpi_video0/actual_brightness` if (( $brt != $abrt )) ; then echo… Read more »
Many distros come with the ability to try or use the distro via a live session on USB or CD without installing it to disk. However, the live session starts fresh with every boot. I recently discovered Casper. It allows you to have a live session on USB with all work saved on USB.
Good post that explains it in layman’s terms.
After my recent experience with broken su and sudo commands in a failed system upgrade, I realized that although disabling the root account has many advantages, one of the disadvantage is that I can’t login as root in the terminal when I’m physically in front of the system. This is a major issue if su,… Read more »