- Published:
- August 16, 2010 – 8:34 am
- Author:
- By Dave
A forum that I am an adminstrator for has been clamoring for an iPhone theme (style) for a long time now. In the past, I hadn’t seen any usable iPhone template for phpBB3, until now.
View this entire post to view my modifications to a theme switcher for mobile devices, so that the end user can disable a mobile theme for their login if they should choose to do so.
Categories: Code Samples,PHP,Software
Tagged: iphone, PHP, phpbb, theme
- Published:
- June 18, 2010 – 6:05 pm
- Author:
- By Dave
We received a tip from blog readers Christian and Michael for alternatives to the command to delete all directories older than a certain period of time. These both work in bash and can be used in scripts to clean up old backup directories or any situation where you need to delete old directories from the [...]
Categories: Linux,Shell,System Administration
Tagged: bash, oneliner, tips
- Published:
- February 23, 2010 – 5:41 pm
- Author:
- By Dave
My professor sent us this little one liner (ok, I had to format it to 2 lines to fit in this blog. You know what I mean) which prints out the current directory tree: ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ \ -e ‘s/^/ /’ -e ‘s/-/|/’ What’s going on here?
Categories: Code Samples,Shell
Tagged: bash, sed
- Published:
- February 13, 2010 – 1:12 pm
- Author:
- By Dave
The Bash command environment, which is the namesake of this blog, is very flexible in that it allows you to manipulate the filesystem in many ways. Awk and sed are very powerful tools that allow you to do this rename with a simple one line command. This post will walk you through doing this with [...]
Categories: Code Samples,Linux,Shell,System Administration
Tagged: awk, bash, csv
- Published:
- January 31, 2010 – 9:53 pm
- Author:
- By Dave
It is very easy to create a random file using the linux command line. Much like the command to fill a file with all zeros, for example a 1 Meg file: dd if=/dev/zero of=zero.filename bs=1024 count=1000 You do the same using /dev/urandom: dd if=/dev/urandom of=random.filename bs=1024 count=1000 Resulting in a 1MB file: 1000+0 records in [...]
Categories: Code Samples,Linux,Security,Shell
Tagged: command line, Linux, tips