LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Convert and resize images using imagemagick

Posted 05-30-2011 at 10:07 PM by sag47
Updated 05-31-2011 at 01:23 AM by sag47

This past memorial day weekend I took a bunch of pictures which I wanted to post to the web. Web photos are best viewed in 800x600px and I had a lot of them. So I used a simple command to do it.
Code:
for x in `ls -1`;do convert -resize 800x600 $x `echo $x | sed 's/.JPG/.png/'`;done
mkdir web_album
for x in `ls -1 *.png`;do convert $x web_album/`echo $x | sed 's/.png/.jpg/'`;done
rm *.png
Now I don't have to spend all my time in Gimp with that simple batch command.
Senior Member
Posted in Uncategorized
Views 3956 Comments 1 sag47 is online now
Old

DVD Ripping

Posted 04-25-2011 at 10:54 AM by sag47

I work for a Scientific Institution and a company which recorded talks decided to give us all the talks in DVD format instead of a hard drive full of video files. This is kind of counter intuitive however luckily I use Linux at work. Long story short mencoder with lame installed solved my problems.

Code:
mencoder 
-vf harddup 
-vf-add smartblur=.6:-.5:0,unsharp=l5x5:.8:c5x5:.4 
-xvidencopts fixed_quant=4:profile=dxnhtntsc 
-lameopts cbr:br=128:aq=0:vol=1
...
Senior Member
Posted in Uncategorized
Views 3013 Comments 1 sag47 is online now
Old

MAC Mania

Posted 04-07-2011 at 02:01 PM by sag47
Tags syslog

Today I was having mac address problems. My corp network runs a mac filtered domain so in order to avoid the hassle of contacting IT (which are stupid) I simply copied the macs from other machines and issued them to my servers (I'm a technical head for my department). Well I didn't save the MAC address and the server was shutdown when we moved it which blew away the mac. What did I do? Search the logs for every MAC address ever.

Code:
find . -type f -print0 | xargs -0 grep -iH '\([0-9a-f]\{2\}[:-]\)\{5\}[0-9a-f]\{2\}\|[0-9a-f]\{12\}'
...
Senior Member
Posted in Uncategorized
Views 741 Comments 0 sag47 is online now
Old

Kernel Panic!

Posted 10-16-2010 at 05:30 PM by sag47
Updated 10-16-2010 at 05:31 PM by sag47
Tags syslog

Everybody dreads it. When you see it, it is difficult to know what to do. Luckily Unix provides utilities which allow us to traverse the filesystem and parse files quickly and effortlessly.

Here's a search command which will search all your log files for keywords such as shutdown, poweroff, and panic.

Code:
find /var/log/ -type f -print0 | xargs -0 grep -iH 'shutdown\|poweroff\|panic' | cut -d: -f1 | sort -u
This will allow you to narrow which log files you...
Senior Member
Posted in Uncategorized
Views 841 Comments 0 sag47 is online now
Old

openbox and repeating keys

Posted 10-11-2010 at 01:50 AM by sag47
Updated 10-11-2010 at 01:52 AM by sag47
Tags openbox

Recently I've been using openbox but it has been driving me crazy! Mainly because when you hold down a key it does not repeat like it does on all other WMs and OSs. After googling around forever I found I can enable my auto repeating keys in ~/.config/openbox/autostart.sh with the following code.
Code:
xset r on
Handy.
Senior Member
Posted in Uncategorized
Views 2748 Comments 1 sag47 is online now

  



All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration