commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
(Useful when firewalls prevent you from using NTP.)
Write a file you edited in Vim but that you do not have the permissions to write to (unless you use sudo.) Same as #1204 but without the echo to stdout that I find annoying.
mounts a samba share on a remote machine using a credentials file that can be in a file tht is not accessable by other users the file will look like:
best option i belive
On RHEL, Fedora and CentOS systems, and maybe others, the sbin directories aren't in the user's $PATH. For those systems that use 'sudo', this can be inconvenient typing the full path all the time. As a result, you can easily take advantage of adding the sbin directories to your PATH by adding this simple line to you .zshrc.
Schedule your Mac to sleep at any future time.
Also wake, poweron, shutdown, wakeorpoweron. Or repeating with
sudo pmset repeat wakeorpoweron MTWRFSU 7:00:00
pmset -g sched
the middle command between the ; and ; is the vi commands that insert that line into the last line of the file, the esc with the carets is literally hitting the escape key, you have to have the smbfs package installed to do it, I use it to access my iTunes music on my mac from my linux PC's with amarok so I can play the music anywhere in the house. among other things, it allows you to access the files on that share from your computer anytime you're on that network.
You can't stand programs x, y, and z. Remove all trace of their existence by adding this function to your config. It will remove the cruft, the settings, and such and such. This function doesn't even give a damn about you trying to remove programs that don't exist: it'll just for loop to the next one on your hit list.
The ssh command alone will execute the sudo command remotely, but the password will be visible in the terminal as you type it. The two stty commands disable the terminal from echoing the password back to you, which makes the remote sudo act as it does locally.