Commands tagged samba (14)

What's this? is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands

Check These Out

Rsync two directories with filtered extensions

Clean way of re-running bash startup scripts.
This replaces the current bash session with a new bash session, run as an interactive non-login shell... useful if you have changed /etc/bash.bashrc, or ~/.bashrc If you have changed a startup script for login shells, use $ exec bash -l Suitable for re-running /etc/profile, ~/.bash_login and ~/.profile. edit: chinmaya points out that $ env - HOME=$HOME TERM=$TERM bash -s "exec bash -l" will clear any shell variables which have been set... since this verges on unwieldy, might want to use $ alias bash_restart='env - HOME=$HOME TERM=$TERM bash -s "exec bash -l"'

Display the size of all your home's directories
Display the size (human reading) of all the directories in your home path (~).

Find number of computers in domain, OU, etc .

Use vi commands to edit your command lines
If you spend all day editing in vi then switching your fingers to Emacs mode just for the command line can be difficult. Use set -o vi in your bash shell and enjoy the power of a real editor.

Blue Matrix
Same as original, but works in bash

check open ports without netstat or lsof

sqlite3 cmd to extract Firefox bookmarks from places.sqlite
Found this useful query at The b.parent=2 in the command refers to the bookmarks folder to extract. See the source webpage for additional info.

Tired of switching between proxy and no proxy? here's the solution.
Replace with your largest local subnet. replace with your proxy information.. Note this only works with a proxy server configured for passive setup.. Now your firefox transparently proxy's stuff destined outside your network.. and Doesn't proxy stuff inside your network. as well as all your other favorite web applications. curl, wget, aria2 ect.

'hpc' in the shell - starts a maximum of n compute commands modulo n controlled in parallel, using make
this oneliner uses make and it's jobserver for parallel execution of your script. The '-j' flag for make defines number of subprocesses to launch, '-f' tells make use stdin instead of Makefile. Also make have neat flag '-l', which "Specifies that no new jobs (commands) should be started if there are others jobs running and the load is at least load (a floating-point number)." Also you can use plain Makefile, for better readability: targets = $(subst .png,.jpg,$(wildcard *.png)) $(targets): echo convert $(subst .jpg,.png,$@) $@ all : $(targets)

Stay in the loop…

Follow the Tweets.

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.


Subscribe to the feeds.

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: