Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts

26 April 2017

chmod

Todays useful tip:


The linux chmod command has two x operands, x (small) and X (big)

Small x means set the execute bit no matter what.

Big X means set the execute bit only on folders (and files where the execute bit is already set, in other words dont break script files)

This means you can do a recursive chmod and set the execute bit correctly.

eg.
chmod -r a+rwX


Its the little things.
*sigh*

23 June 2014

Netsupport Mac Client CPU Issue

Netsupport is great.  It allows you to remote access, and control other machines on your network.  Of course there are other ways to do it eg RDP, and VNC, but netsupport nicely ties it all together and makes it very easy.

I did have an issue however, on the Mac, I just wanted to install the Netsupport Manager,  ie I just wanted to control other machines, and not be controlled.  During the installation there didn't seem to be any options to not install the client, but as I checked the 'control and manage only' option (or words to that effect) and assumed the client wouldn't be installed.  

Not only was the client installed, but when the machine is idle. The Netsupport Client processing is running, and taking up about 8-10% CPU all the time.  As I have a reasonably decent machine (OS X 10.9.3, 2.3GHz i7, 16GB RAM) this CPU use is hardly noticeable, but it really bugged me.

Killing the process wont work as it's restarted automatically, so I had to look a little deeper.

The secret is in

/Library/Preferences/NetSupport/NetSupportManager

There are 2 files:

ns-login.sh
ns-logout.sh

In the login file I just commented out the line where the monitoring process is started:

#${SESSIOND} "*" /s &

This stops the client from being started, and restarted.  The Netsupport Manger still works, ie connects and Controls other machines, but I dont have the Client eating 10% of my CPU now.

01 September 2006

Removing a Windows Service

Ever had a pesky windows service that is still listed as a service, even though you have deleted/uninstalled the application.

Fear not, an answer is here,in the form of the "sc" windows command line utility.

Eg.

C:>sc delete
DESCRIPTION:
Deletes a service entry from the registry.
If the service is running, or another process has an
open handle to the service, the service is simply marked
for deletion.
USAGE:
sc delete [service name]



Now thats magic!

By the way, only do this if you know what you are doing, if you delete the wrong service you may have to waste a weekend reinstalling windows.

You have been warned!