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 command example converts to 25 fps subtitles that were originally created for 24 fps movie
I liked vaporub's suggestion, here a little simplification of the sed command.
Multi-word parameters in my.cnf can be written with either hyphens or underscores. innodb_file_per_table is the same as innodb-file-per-table, as well as innodb_file-per_table. The script normalizes the parameter names to using underscores only, keeping from changing values (e.g. ?mysql-bin? parameter value should not change).
"normalize" a my.cnf file.
Another way of do it in debian like distros, don't know if works for others
This command should be the first file-editing command for a newbie. It clears file.txt (cat), and asks for input until EOF is entered on its own line (not written to file.txt).
No need for the ls -r and a sort is also not really needed.
Add DuckDuckGo Search as search provider on gnome-shell/gnome3 .
Needs root permission. To see the results, use alt+f2 and then type r.
Where 192.168.1.2 is a printer with jet-direct.
No, I don't suggest this as a backup method.
This should probably only be used for testing in a dev environment as it's not terribly efficient, but if you're doing something that might trash a DB and you still want the old data available, this works like a charm.
tired of opening tabs and fill in search forms by hand? just pipe the search terms you need into this surfraw loop. you can use any browser you have installed, but a graphical browser with a tabbed interface will come in handy. surfraw can be found here:
Put this command on /etc/rc.local.
An advanced possibility to count the lines of code like in #8394