commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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:
compare to alternative :
- directly tests the -STOP of the process to continue or stop loop,
- background operator should be set (or not) at the call of the function
For extension i suggest a slowPID() based on kill like above and a slowCMD based on killall.
Gets all kind of info, ifconfig.me rocks ...
for just the ip addess you can use ifconfig.me or ifconfig.me/ip
Will split the std input lines into files grouped by the 5th column content.
Some IO intensive process make the system unresponsive. This function periodically starts/stops a process, which hopefully releases some resources for other activities.
This function is useful when ionice is not available
I wrote this a long time ago, wondering why this wasn't floating around somewhere out there (at least not where I could find).. this seems much more simple than multiple aliases and can cd out of directories easier.
Realtime lines per second in a log file using python ... identical to perl version, except python is much better :)
from
1.ogg
2.ogg
3.ogg
10.ogg
11.ogg
to
01.ogg
02.ogg
03.ogg
10.ogg
11.ogg
. a Ruby SSH helper script
. reads a JSON config file to read host, FQDN, user, port, tunnel options
. changes OSX Terminal profiles based on host 'type'
USAGE:
put 'ash' ruby script in your PATH
modify and copy ashrc-dist to ~/.ashrc
configure OSX Terminal profiles, such as "webserver", "development", etc
run "ash myhostname" and away you go!
v.2 will re-attach to a 'screen' named in your ~/.ashrc
When downloading files on a Mac, Apple adds the x-attribute: com.apple.quarantine. Often, this makes it so you can't even run a ./configure. This command gets rid of the quarantine for all files in the current directory.
Per country GET report, based on access log. Easy to transform to unique IP
If your locale has Monday as the first day of the week, like mine in the UK, change the two $7 into $6
You can find Sopcast for linux on Softpedia:
http://linux.softpedia.com/get/Multimedia/Video/SopCast-21690.shtml
This will generate the same output without changing the current directory, and filepath will be relative to the current directory.
Note: it will (still) fail if your iTunes library is in a non-standard location.
or
tree -ifsF --noreport .|sort -n -k2|grep -v '/$'
(rows presenting directory names become hidden)
Useful when we need to create new certificate for site when current one is near expiry.
This downloaded cert can be used to provide organisational data directly to new cert. using below command.
e.g. openssl x509 -x509toreq -in /tmp/example.com.cert -out example.com.csr -signkey example.com-key.pem