Archive for the UNIX Category

Simple Java File Read/Write Example

Here is a simple example of a Java class that will read/write a file byte by byte
/*
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package filereader;
 
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
 
/**
*
* @author dphegarty
*/
public class Main {
 
/**
[...]

Windows admin from Linux

I work in a Windows environment, but run Ubuntu on my desktop. I am always on the look out for Linux utilities that replace the Windows bound ones. So far I’ve found a replacement for just about everything I need execpt PSExec, but today that is no more.

sudo apt-get install wmi-client

This handy package installs winexe [...]

Creating a list of installed Packages on Ubuntu

Here is a handy tip I came across for creating a list of installed packages on Ubuntu.
 
dpkg –get-selections > installed-software
 

The original thread can be found here: Orginal

Script to Convert Hostname to IP

Here is a shell script I wrote to translate NetBOIS names to IP addresses. SAMBA needs to be install for the nmblookup command. I work mostly on Linux / OS X but we are a Windows shop so I wrote this shell script to help convert hostnames to IP address for windows machines. Not every [...]

jump2top free wordpress themes