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:
This is really not cli but I think it's neat.
For Mac OS X users only
Sometime you need to run firefox from the command just to rectify something about it.Means,if some of the addon broke you firefox setting or theme broke your ff setting then fall back to commandline i.e shell and type the mentioned command. It will open up an information box with few option along with the checkbox besides them(means you can select them) to start the web browser in safe mode.Besically deactivating all the addon and theme,except the default one.Once you are done/rectified thing ..close that session and reopen the browser normally.It should work.
Sqlite database keeps collecting cruft as time passes, which can be cleaned by the 'vacuum;' command. This command cleans up the cruft in all sqlite files relating to the user you have logged in as. This command has to be run when firefox is not running, or it will exit displaying the pid of the firefox running.
Check which files are opened by Firefox then sort by largest size (in MB). You can see all files opened by just replacing grep to "/". Useful if you'd like to debug and check which extensions or files are taking too much memory resources in Firefox.
killall -CONT -m firefox
Suspends all Firefox Threads. Results in Zero CPU load.
Useful when having 100+ Tabs open and you temporarily need the power elsewhere.
Be careful - might produce RACE CONDITIONS or LOCKUPS in other processes or FF itself.
matching is case sensitive.
Sometimes Firefox crashes or is bad finished and the message the process is still running appear while it's not. This also works when you sharing account from a NIS server and try to open the browser on multiple computers.
Ever since the switch to pulseaudio, Ubuntu users including myself have found themselves with no sound intermittently. To fix this, just use this command and restarts firefox or mplayer or whatever.
To install a theme use:
sudo firefox -install-global-theme /path/to/theme
You can get the .xpi or .jar file from the versions history on the add-on/theme page.
NOTE: may not work in your system (Debian-based is an example).