Pages
-
Recent Posts
- Revolving Door: MPAA Hires Chief USTR Negotiator Behind ACTA And TPP’s IP Chapter
- Copyright Maximalists’ Incredible Sense Of Entitlement: If It Challenges The Biz Model We Chose, It Must Be Illegal
- Turkey’s Prime Minister Sues His Own Country Over Twitter
- Picturefill 2
- Police File On Student ‘Bullied Into Committing Suicide’ Strangely Lacking In Evidence Of Bullying
Archives
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- October 2008
Meta
Category Archives: tip
PHPHOST BLOG
Web Hosting Related Articles You May Need
[one-liner]: Improving the performance of SSH Tunnels using Alternative Ciphers; when displaying X11 Apps
Background
Have you ever used an ssh tunnel to try and remotely display an X windowed application and then wished you hadn’t, because the performance was so bad you’d be waiting till next week for the window to come up?
Read on because here’s how you can make this much more tolerable & usable.
Solution
There are 2 […]
Readers who viewed this page, also viewed:
Posted in one-liner, shell, ssh, Syndicated, tip, tips & tricks
Comments Off on [one-liner]: Improving the performance of SSH Tunnels using Alternative Ciphers; when displaying X11 Apps
How to programmatically determine the highest version kernel RPM installed?
Background
Recently on the StackExchange site Unix & Linux the following question came up which seemed easy enough to answer.
How to programmatically determine the highest version kernel RPM installed?
This turned out to be trickier than I originally thought. What follows is my ultimate answer along with several failed attempts. I leave them so that others can […]
Readers who viewed this page, also viewed:
Posted in centos, fedora, package management, rhel, rpm, Syndicated, sysadmin, tip, tutorials
Comments Off on How to programmatically determine the highest version kernel RPM installed?
Why are “executables” such as reboot, shutdown, and vgscan symlinks in the /sbin directory?
Background
If you’ve ever gone poking around in your Linux system’s /sbin directory the site of files like this might make you scratch your head.
1
2
3
4
5
6
7
8
lrwxrwxrwx 1 root root 3 Jun 7 2011 vgmerge -> lvm
lrwxrwxrwx 1 root root 3 Jun […]
Readers who viewed this page, also viewed:
[one-liner]: How to Manipulate an Image Files Modify/Create Date/Time
Background
Recently I answer a question on superuser.com about how to modify the modify/create time/date on an image file such as a TIFF or PSD formatted file.
Solution
There are basically 2 ways to change the modify/create meta data on a file:
From the file-system’s perspective.
Within a file’s metadata.
NOTE: If you’d like to follow along here’s a sample PSD […]
Posted in file-format, images, one-liner, Syndicated, tip, tips & tricks
Comments Off on [one-liner]: How to Manipulate an Image Files Modify/Create Date/Time
[one-liner]: Statically building Subversion on Fedora 14
Background
In my experience it can be tricky to compile applications that make use of 3rd party libraries and/or system libraries such as glibc etc. The problem is that in addition to your application being built statically, all these libraries need to provide both a dynamic (.so) version as well as a static version (.a) and […]
Readers who viewed this page, also viewed:
Posted in compiling, linux, one-liner, programming, Syndicated, tip, tips & tricks
Comments Off on [one-liner]: Statically building Subversion on Fedora 14
Howto Create a Daily Rotating Log in Perl using Log::Log4Perl
Background
Recently while cruising StackOverflow I came across this question where a user was trying to use the Perl module Log::Log4Perl. Log4Perl provides a mechanism similar to log4j (logging for Java) for logging mesages to various outputs such as the console or a log file. I’ve used this module a couple of times in the past […] Continue reading
Posted in perl, programming, Syndicated, tip, tips & tricks
Comments Off on Howto Create a Daily Rotating Log in Perl using Log::Log4Perl
[one-liner]: Using scp to Copy Files that Contain Spaces
Background
Have you ever needed to copy either a single file or a directory that contains spaces using scp? Here are a couple of techniques for how to do this.
Solution
Here are several ways to accomplish the same thing. Copying a entire directory with spaces and copying a file with spaces using scp.
1
2
3
4
5
6
7
# Ways to copy entire […] Continue reading
Posted in bash, one-liner, script, Syndicated, sysadmin, tip, tips & tricks
Comments Off on [one-liner]: Using scp to Copy Files that Contain Spaces
CentOS RPM Tutorial Part 4 – Another Example of Rolling your Own .spec File
Getting Started
In this 4th installment of my series on RPM packages I’m going to show another example where I package up a tarball that I’ve created, and roll it into an RPM file. For this example I’ll be packaging up a Perl script and a man page. NOTE: Refer to my previous posts (part 1, […] Continue reading
Example Bash Script which Monitors if a Program has Died, and Restarts it
Background
Here’s a quick script that might prove useful if you need to watch if a program is running and restart it if it stops for whatever reason. It is by no means fault tolerant, but could be adapted to be more so if needed.
Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# NAME: check_dropbox.bash
# DESC: watch if dropbox is running
check_process() {
[…] Continue reading
Posted in bash, monitoring, script, Syndicated, tip, tutorials
Comments Off on Example Bash Script which Monitors if a Program has Died, and Restarts it
[one-liner]: Commenting out a block in an XML file using sed
Background
This issue came up recently where I needed to programmatically comment out a section of tags in an XML file.
1
2
3
4
<login-module code="org.dcm4chex.archive.security.TrustLoginModule"
flag = "required" >
[…] Continue reading
Posted in one-liner, sed, Syndicated, tip, tips & tricks, XML
Comments Off on [one-liner]: Commenting out a block in an XML file using sed