Commands tagged pdfpages (3)

  • This is an example of the usage of pdfnup (you can find it in the 'pdfjam' package). With this command you can save ink/toner and paper (and thus trees!) when you print a pdf. This tools are very configurable, and you can make also 2x2, 3x2, 2x3 layouts, and more (the limit is your fantasy and the resolution of the printer :-) You must have installed pdfjam, pdflatex, and the LaTeX pdfpages package in your box. Show Sample Output

    pdfnup --nup 2x1 --frame true --landscape --outfile output.pdf input.pdf
    TetsuyO · 2010-12-21 14:20:06 0
  • This will crop each page of the PDF by 10mm left, 11cm bottom, 22pts right, and nothing from the top.

    pdfjam --clip true --trim '10mm 11cm 22pts 0' m.pdf
    qdrizh · 2014-07-08 10:57:54 0
  • using awk, changed the line given by sucotronic in command #11733 to print the first and second columns Show Sample Output

    find . -name "*.pdf" -exec pdftk {} dump_data output \; | grep NumberOfPages | awk '{print $1,$2}'
    mtrgrrl · 2014-11-14 23:36:56 0

What's this? 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.

Share Your Commands

Check These Out

put all lines in comment where de word DEBUG is found

Find out what the day ends in
Several people have submitted commands to do this, but I think this is the simplest solution. It also happens to be the most portable one: It should work with any sh or csh derived shell under any UNIX-like OS. Oh by the way, with my German locale ($LC_TIME set appropriately) it prints "g" most of the time, and sometimes (on Wednesdays) it prints "h". It never prints "y".

Re-use the previous command output
The $(!!) will expand to the previous command output (by re-running the command), which becomes the parameter of the new command newcommand.

Runs a command without hangups.
puts command in background and sends its output to nohup.out file it will not die if you log out fromyour shell session ;-)

Convert seconds to [DD:][HH:]MM:SS
Converts any number of seconds into days, hours, minutes and seconds. sec2dhms() { declare -i SS="$1" D=$(( SS / 86400 )) H=$(( SS % 86400 / 3600 )) M=$(( SS % 3600 / 60 )) S=$(( SS % 60 )) [ "$D" -gt 0 ] && echo -n "${D}:" [ "$H" -gt 0 ] && printf "%02g:" "$H" printf "%02g:%02g\n" "$M" "$S" }

Route outbound SMTP connections through a addtional IP address rather than your primary

Minimize active window
Bind it to some shortcut key, using something like xbindkeys-config (if you do not have xbindkeys: apt-get install xbindkeys xbindkeys-config)

climagic's New Year's Countdown clock
This is the 140 character long new year's countdown timer that was posted to the climagic account on twitter and There are saner ways of doing this of course, but probably none of those would fit. Uses the figlet command, but of course you can replace figlet with just echo if you want.

extract column from csv file
extracts the 5th column using the delimiter ','

display contents of a file w/o any comments or blank lines

Stay in the loop…

Follow the Tweets.

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.


Subscribe to the feeds.

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: