rhyme time
mime
rhyme lowrez
Juarez
Get newest kernel version by parsing the most bleeding-edge Makefile possible. Useful for doing things like writing live ebuilds and/or self-updating PKGBUILDs for testing purposes. Breakdown: * wget -qO - https://raw.githubusercontent.com/torvalds/linux/master/Makefile — retrieve Makefile and pipe to stdout * head -n5 — only the first 5 lines are relevant, that's where all the version variables are grep -E '\ \=\ [0-9]{1,}' — version variables always have an equals sign followed by a number * cut -d' ' -f3 — extract the individual numbers from the version variables * tr '\n' '.' — replace newlines with periods * sed -e "s/\.$// — remove trailing period Show Sample Output
The command as given would create the file "/result_path/result.tar.gz" with the contents of the target folder including permissions and sub- folder structure. Show Sample Output
AIX user administration whithout smitty
Probably the most info for the least work. Show Sample Output
Just use "od" and it can also dump in decimal or octal. (use -t x1 and not just -x or it confuses the byte order) There is a load of other formatting options, I'm not sure if you can turn off the address at the start of the line. Show Sample Output
Given that file1 has bunch of lines (i.e. TSV file with first column as row titles), and file2 has bunch of words (i.e. row titles that are in file1), this command takes every word from file2, and removes every line in file1 that starts with that word.
Could easily be used for lowercase --> ((i=97;i Show Sample Output
Copies file to a temporary location, edit and set to real file's time stamp then copy back. Assumes access to /tmp and has $EDITOR, but can be replaced with better values.
This command drops all the tables of the 'public' schema from the database.
First, it constructs a 'drop table' instruction for each table found in the schema, then it pipes the result to the psql interactive command.
Useful when you have to recreate your schema from scratch in development for example.
I mainly use this command in conjunction with a similar command which drop all sequences as well.
Example :
psql -h <pg_host> -p <pg_port> -U <pg_user> <pg_db> -t -c "select 'drop table \"' || tablename || '\" cascade;' from pg_tables where schemaname='public'" | psql -h <pg_host> -p <pg_port> -U <pg_user> <pg_db>
psql -h <ph_host> -p <pg_port> -U <pg_user> <pg_db> -t -c "select 'drop sequence \"' || relname || '\" cascade;' from pg_class where relkind='S'" | psql -h <ph_host> -p <pg_port> -U <pg_user> <pg_db>
See it scripted here : https://gist.github.com/cuberri/6868774#file-postgresql-drop-create-sh
After updating to the latest ffmpeg with homebrew
Replace VM directory and file prefix with new prefix Once the the file names are updated the config files will need to be updated using command similar to the following: sed -i -- 's/original_/new_/g' *.vmx sed -i -- 's/original_/new_/g' *.vmxf sed -i -- 's/original_/new_/g' *.file.vmdk sed -i -- 's/original_/new_/g' *_file_1.vmdk
The only command-line version of this task I could come up with that properly handles UTF-8 input, too. (Yes, I know how crazy it is to have UTF-8 with HTML entity escapes, but that stuff exists... sadly...; Just check Twitter.)
Sample:
nword 3
err
nword 18
misinterpretations
Piping dd through pv allows to control the size ot the output file and allows for feedback on speed and progress. Sample output is 128 bytes as seen with xxd. See also: http://www.red-bean.com/onetime/#pad-generation Show Sample Output
The easiest way to sync a local directory to Rackspace cloud files is through the console tools provided by the openstack/swift project. On ubuntu, the tools can be installed with apt-get install python-swiftclient Then, assuming you are in the directory you want to upload, run the following command in the terminal: This will recursively upload the files from your current directory to the container, saving time by uploading only changed files. You need to supply the you use to log in to the Cloud Control Panel and the available under Account / Account Settings in the same control panel. Attention: If you use relative or absolute paths, swift will upload them with the pseudo-path provided on the command line into the container. So if instead of syncing . you sync /var/www/test, then files will end up under /var/www/test pseudo-path of the container - most likely, this is not what you want.
Extrae los registros MX Show Sample Output
Use this to turn a page with snippets of equations into vector paths that Adobe Illustrator can handle without choking on font embedding and substitution issues. Good for keeping fonts consistent when labeling charts and diagrams. Also good for embedding formulas into diagrams.
Useful in scripts while you just need an IP address in a variable. Show Sample Output
This is useful for piping to other commands, as well:
svn status | egrep '^(M|A)' | egrep -o '[^MA\ ].*$' | xargs $EDITOR
this adds a random color to your prompt and the external ip. useful if you are using multiple mashines with the same hostname. Show Sample Output
commandlinefu.com 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.
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: