Archive for November, 2008

Lenovo/IBM Cisco VPN problem

Wednesday, November 26th, 2008

Yesterday I tried to connect to my work network with Cisco VPN client after recent reinstallation of my laptop but without success.

Error that I was getting was PEER_DELETE-IKE_DELETE_UNSPECIFIED. I tried to find some with similar problem on Google but that wasn’t successful either.

So the only thing to do was to install Windows from scratch and begin from start again with elimination of software.

After a while I have found that new version of Thinkpad Fingerprint Software 5.8 was cause of my agony. It took me almost 2 days to find this error but reverting on older version 5.6 solved the problem.

I hope that this will help someone with similar problem like I had.

How to mount web folder (webdav) under Linux?

Sunday, November 23rd, 2008

I have recently received 10GB of disk space from my ISP for free so I thought that I could store backup of my local server there.

For making my Ubuntu server to recognise webdav as a file system I needed to install package davfs2.

After installation all I needed to do was to create one new directory on / and execute following command:

mount -t davfs http://your.server/your_username /mount_point

After that you will get prompt to enter username and password.

That’s it, now you have your webdav folder mounted.

Creating simple cleanup scripts on Windows 2003

Monday, November 10th, 2008

Here is one short tip. If you had problem with old log files that are being held on system after too much time and wanted to delete all of them automatically here is explanation how to do it.

  1. open notepad
  2. write this line in it Forfiles -p “c:\temp” -s -m *.log -d -14 -c “Cmd /C del @FILE”
  3. save file and then change it extension from .txt to .bat

So here we have batch file created that will do following:

  • find all .log files in c:\temp path
  • older than 14 days
  • and delete them

Here is small explanation of the command line:

  • -p “full path” is used to specify exact path to the destination dir, it can be c:\ or c:\temp
  • -s says to forfiles that it will go recursive into subdirs
  • -m *.ext creates filter for files of the .ext extension, it can be *.* as well
  • -d 7 says to forfiles to filter files from output above to match current date minus number of days
  • -c “command” executes command on files that are returned from output of forfiles command
  • cmd /c command is saying to cmd that is command prompt to execute command and terminate itself

Now to test this batch file you can delete or comment out command part so you will get output from forfiles only without deleting of the files. Also you can use move command instead of del to move logfiles to another location.

If everything works like it should open Start->Control panel->Scheduled tasks and create new task to executes every day or in any time frame that you want.