Netbeans on Windows XP

Posted in Java, MySql on November 30th, 2010 by phoenixdigital

Here are some tips for getting Netbeans working on Windows XP.
Read more »

Common Unix Commands

Posted in Unix on November 24th, 2010 by phoenixdigital

Create a simple tar of a directory
tar -cvf /tmp/this.tar /directoryToArchive

Create a gzipped tar of a directory
tar -cvzf /tmp/this.tgz /directoryToArchive

Mount an external USB drive

  1. First plug the drive in and then type
    tail /var/log/messages
  2. look for something like ‘sdd’ which shows the device this drive was assigned to. The number after it is the partition on the drive
  3. Then mount the drive
    mount /dev/sdd1 /tmp/YourMountDirectory

Format External Drive to ext3
mkfs.ext3 /dev/sdd1

Create a user
adduser theUsername

Create a group
groupadd staff

Add existing user to a group
usermod -g staff user1

Add user to sudoers
visudo (Then find the lines that look like below and add it)
theUsername ALL=(ALL)       ALL
Then restart sshd
service sshd restart

Disable plaintext passwords
vi /etc/ssh/sshd_config

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication no

Finding a file by name
find / -name filename.txt -print

Finding a file by containing ‘Gas’
find . -type f -print | xargs grep Gas

Finding all directories in current path
find . -type d

Finding all items in current path with modified time less than 60 mins
find . -mmin -60

Finding all items in current path with modified time less than 1 day
find . -mtime -1