commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
This is a handy command to put into ~/.bash_logout to automatically un-mount windows shares whenever the user logs out. If you use this on as a non-root account then you'll need to append sudo before umount and the user will need to have the appropriate sudoer rights to run the /bin/umount command.
otherwise you get this error message:
svn: Can't move '.svn/tmp/entries' to '.svn/entries': Operation not permitted
Control (stop, start, restart) a Windows Service from a Linux machine which has the `net` command (provided by samba).
It will only work if the service NETSEND in the Windows machine is enabled.
Checks for PC samba name and workgroup. Works fine for Windows hosts and Linux/UNIX PCs running Samba.
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:
username="username"
password="password"
best option i belive
If you use Linux in a Windows domain and there are N days to expiry, this is how you can change it without resorting to a windows machine.
See smbstatus Output within a 5 second interval (for monitoring smb access)
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.