Wednesday, April 18, 2012

Websphere rename the host name



We can rename the host name configured in Websphere using wsadmin tool

Step 1) Navigate to WAS home

Ex: cd /opt/WebSphere70/profiles/AppSrv01/bin/

Step 2) issue below command to start wsadmin tool (Relace server1 with the server name of yours)

wsadmin.sh server1

Now new wsadmin shell opens and the command pre text will be wsadmin>

Now issue to change host name, please not to forget to issue save command after that... :)

$ AdminTask changeHostName {-nodeName vboxNode01 -hostName 127.0.0.1  -systemName vbox }

$ AdminConfig save


Monday, April 16, 2012

Finding files by date with the Linux find command



Ref: http://blog.arithm.com/2008/12/15/finding-files-by-date-with-the-linux-find-command/

Here’s something I’ve wanted to know how to do since forever.

Use this trick to find files that have been modified since some arbitrary date:
$ touch -d "13 may 2001 17:54:19" date_marker
$ find . -newer date_marker

To find files created before that date, use the cnewer and negation conditions:

$ find . ! -cnewer date_marker

And to delete them, use the built-in “delete” action, eg:

$ find . ! -cnewer date_marker -delete
~