Batch script to test if folder / directory is empty

Yesterday I needed a Dos batch script to check if folder is empty. A little Google search revealed some methods: Using dir and find commands, does not work on non-english Windows versions: www.computing.net Using dir command with /a-d, does not work for folders: www.computing.net Using dir and findstr commands, does not work on non-english Windows …

Join (merge / concatenate) split files: Windows or Linux

Sometimes you have to join two files together. There are plenty of tools for file spitting and joining (restoring), but I prefer the build in ones. Use copy command under Windows: copy /B file1.ext + file2.ext result_file.ext “B” stands for binary file Use cat command under Linux: cat file1.ext file2.ext > result_file.ext Here are two …

Ubuntu Server static ip problems – ubuntu reverts back to DHCP on its own

Many people report that Ubuntu Server suddenly reverts its static IP address to dynamic (via DHCP). Here are some discussions: static ip reverts back to DHCP (ubuntuforums.org). Static IP reverting to DHCP on Ubuntu Server 8.04 (www.howtogeek.com). This happened to me today with Ubuntu Server 9.04. Rebooting the server after installation have solved this problem.