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:
If you have a directory with lot of backups (full backups I mean), when it gets to some size, you could want to empty some space. With this command you'll remove half of the files. The command assumes that your backup files starts with YYYYMMDD or that they go some alphabetical order.
%qdbus org.freedesktop.PowerManagement /org/kde/Solid/PowerManagement suspendToRam
Service 'org.freedesktop.PowerManagement' does not exist.
This uses the KDE suspend to ram.
Used it on daily basis, not sure if it's any better than the OPs version, tho'
One advantage is - you can replace 'bash' at the end of the line with eg. cat - to check if the generated command is OK.
This command will grep the entire directory looking for any files containing the list of files. This is useful for cleaning out your project of old static files that are no longer in use. Also ignores .svn directories for accurate counts. Replace 'static/images/' with the directory containing the files you want to search for.