Changes are displayed when they are written to the file to exit Show Sample Output
like #9295, but awkish instead of perlish
Put in your path (.bashrc or similar). Then instead of running '$ git-commit -m ' use '$ git-random'
tail() { thbin="/usr/bin/tail"; if [ "${1:0:1}" != "-" ]; then fc=$(($#==0?1:$#)); lpf="$((($LINES - 3 - 2 * $fc) / $fc))"; lpf="$(($lpf<1?2:$lpf))"; [ $fc -eq 1 ] && $thbin -n $lpf "$@" | /usr/bin/fold -w $COLUMNS | $thbin -n $lpf || $thbin -n $lpf "$@"; else $thbin "$@"; fi; unset lpf fc thbin; }
This is a function that implements an improved version of tail. It tries to limit the number of lines so that the screen is filled completely. It works with pipes, single and multiple files. If you add different options to tail, they will overwrite the settings from the function.
It doesn't work very well when too many files (with wrapped lines) are specified.
Its optimised for my three-line prompt.
It also works for head. Just s/tail/head/g
Don't set 'thbin="tail"', this might lead to a forkbomb.
logtop show number of lines per second, also classify them so you can show a "top" of every aspect of your logfile : tail -f access.log | awk '{print $1; fflush();}' | logtop
This particular combination of flags mimics Try CoffeeScript (on http://coffeescript.org/#try:) as closely as possible. And the `tail` call removes the comment `// Generated by CoffeeScript 1.6.3`. See `coffee -h` for explanation of `coffee`'s flags. Show Sample Output
Use this command to see logs update in real time
ok I'm sure it's not pretty Show Sample Output
Not as far off as you thought, now is it? -mac fanboy Show Sample Output
but you can't see the colors in that sample output :( Show Sample Output
Useful with new unknown devices or just monitoring, probably useful for the sysadmin. Updates every 2 seconds. More here: http://linuxclisecurity.blogspot.com/2009/12/monitor-kernel-ring-buffer.html.
Instead of having someone else read you the Digg headlines, Have OSX do it. Requires Curl+Sed+Say. This could probably be easily modified to use espeak for Linux.
Not perfect but working (at least on the project i wrote it ;) ) Specify what you want search in var search, then it grep the folder and show one result at a time. Press enter and then it will show the next result. It can work bad on result in the firsts lines, and it can be improved to allow to come back. But in my case (a large project, i was checking if a value wasn't used withouth is corresponding const and the value is "1000" so there was a lot of result ...) it was perfect ;)
List all files in a directory in reverse order by modified timestamp. When piped through tail the user will see the most recent file name.
This is a little trickier than finding the last Sunday, because you know the last Sunday is in the first position of the last line. The trick is to use the NF less than or equal to 7 so it picks up all the lines then grep out any empty lines. Show Sample Output
Replace $CMDLINE_FILENAME with the name of the cmdline file you copied from /proc/pid, and $COMMAND with the command to execute with those arguments.
tail would be considered dull, but pair this with being able to push out unix commands over ARD, and life gets easier. (Same can be said for my TimeMachine scrape command, http://xrl.us/begrzb) Show Sample Output
The pipe to head removes the listing of . as the largest directory.
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: