Useful Unix / Linux Command

Some useful Unix / Linux Command:

1) find
- find . -name "rc.conf"
- website references : http://www.athabascau.ca/html/depts/compserv/webunit/HOWTO/find.htm

vmware CD/DVD Drive: "Connected - client unknown" error



I encounter 'CD/DVD Drive: "Connected - client unknown"' error after reverting the vmware snapshot. From there onwards, the virtual CD/DVD Drive stops working and not allowing me to mount any iso images.

After searching the VMware Communities forum, here is the solution to it.

1) Remove the VMware tools.
2) Re-install the VMware tools.

That's how simply the solution is! :)

NSLOOKUP: Can't find server name for address XXX.XXX.XXX.XXX: Non-existent domain

When you do a 'NSLOOKUP' and encounter a similar error as below
"
C:\>nslookup
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Can't find server name for address 192.168.1.2: Non-existent domain
*** Default servers are not available
"

Verify that the PTR record is added for the DNS Server(s) is in the DNS Forward and Reverse Lookup Zones.

Do a ipconfig/flushdns and try NSLOOKUP again. That error should not occurs again. :)

Windows Server Hacks: Remotely Enable Remote Desktop

This tip comes really handy when you want to enable Windows remote desktop remotely.

Articles lifted from http://www.windowsdevcenter.com/pub/a/windows/2004/05/04/serverhacks_remote.html
"
Remote Desktop is a cool feature of Windows Server 2003 that lets you remotely log on to and work at a machine as if you were seated at the local console (in Windows 2000 Advanced Server, this feature was called Terminal Services in Remote Administration Mode). Remote Desktop can be a lifesaver for fixing problems on servers at remote sites, but what if you forgot to enable the feature before you shipped the server out to Kalamazoo? Enabling Remote Desktop is easy if the server is in front of you: just log on as an administrator, open System in Control Panel, select the Remote tab, and under Remote Desktop select the checkbox labeled "Allow users to connect remotely to this computer." Unfortunately, you can't use the System utility to enable Remote Desktop on a remote machine, though you can access some properties pages of System using Computer Management by first connecting the console to a remote computer, then right-clicking on the root node and selecting Properties. Unfortunately, as you can see in Figure 1 below, the Remote tab is not available when you access System properties this way on a remote machine (here named SRV220).

Figure 1
Figure 1. System properties for a remote machine does not have Remote tab.

Fortunately, there's a workaround. Sit down at your desk and log on to your Windows XP workstation using your administrator credentials and start Registry Editor by Start --> Run --> regedit --> OK. Then select the Connect Network Registry option under the File menu (Figure 2).

Figure 2
Figure 2. Connecting to the Registry on a remote machine.

This opens the Select Computer search box. Either browse Active Directory to locate the remote server, or type its name in the textbox (Figure 3).

Figure 3
Figure 3. Connecting to the Registry on a remote server named SRV220.

Click OK and a node will be displayed in Registry Editor for the remote machine (Figure 4).

Figure 4
Figure 4. HKLM and HKU hives on SRV220.

Now browse HKLM on SRV to find the following Registry key (Figure 5).

HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Figure 5
Figure 5. Registry key for Terminal Server on remote machine.

Under the Terminal Server key, you'll find a REG_DWORD value named fDenyTSConnection. Double-click on that value to open the Edit DWORD Value box and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled), as in Figure 6 below.

Figure 6
Figure 6. Set fDenyTSConnections to 0 to enable Remote Desktop on SRV220.

The remote machine needs to be rebooted for the change to take effect, so open a command prompt and type the following command:

shutdown -m \\srv220 -r

After the remote machine reboots, Remote Desktop should be enabled on it. To test this from your workstation, open Start --> All Programs --> Accessories --> Communications --> Remote Desktop Connection, enter the name of the remote server in the Remote Desktop Connection logon box, supply your administrator password when prompted, and you're in.

"

xcopy 255 characters limitation walk around

Ever tried using the xcopy command and face an error 'insufficient memory'? This is probably due to the path of the files that you are copying exceeded 255 character. This is the limitation of xcopy.

After googling for an walk around, i stumble upon robocopy which is an administrator utility within the Windows 2003 Resource Kit Tools. The fundamental of robocopy is based on xcopy. It have advance features and comes with no 255 characters limit! Isn't that great?

It works for both 32bit and 64bit OS (Operating Sytem) and NT filesystem only. Do take note of that.

There's a CLI (Command Line) version and a GUI Version. I would strongly recommend using the CLI Version as it comes with all the advances features of robocopy.

Most often command that i use are as follows

/b - opens files in backup mode. Backup mode allows files to be opened without security restrictions, but requires additional rights on both the source and destination systems.

/s -copies subdirectories unless they're empty (like XCOPY)/e - copies subdirectories, even empty ones (like XCOPY)

/xo - eXclude Older files (Please note that the Robocopy GUI (3.1.1) does not seem to use this switch correctly, meaning it still copies older files over newer ones.)

Below are some sites on Robocopy:

Information
http://en.wikipedia.org/wiki/Robocopy
http://www.ss64.com/nt/robocopy.html

GUI Version
http://www.microsoft.com/technet/technetmag/issues/2006/11/UtilitySpotlight/

CLI Version
http://go.microsoft.com/fwlink/?LinkId=72969