Showing posts with label Running. Show all posts
Showing posts with label Running. Show all posts

April 27, 2017

Windows: Find which port is getting used/mapped by which process/program with details from task manager

Hi friends,

Today, I have come across with a situation of finding the port-program mapping.

Procedure


  • Open command prompt
  • Enter the following command
  • Syntax: netstat -aon | find ":"
  • Example: netstat -aon | find ":80"
  • Get the PID (Process Id) from the list



  • Execute the following command
  • Syntax: tasklist "PID eq "
  • Example: tasklist "PID eq 9192"


Please send your queries and feedback to psrdotcom@gmail.com

August 25, 2010

Running job in regular intervals or daily in Linux to delete files or modifying files

Running scripts daily to perform some common tasks in Linux
Be in root mode, super user mode
1) Create a script with the name filename.sh or any other name whatever you like
2) Do any one of the following .. but please test it with some other file extension like .yourname or something .. create your own unique files and do the testing before executing on original files which may be important.
   
   find /folderpath -type f -iname "*.fileextension" | xargs -i '{}' rm -rf {}
   (or)
   find /folderpath -type -f -iname "*.fileextension"  -exec /bin/rm -rf {} \;
3) chmod +x filename.sh
4) crontab -e
    i) press i to go into insert mode
    ii) enter 30 20 * * 1-5 /bin/bash /fullpath        
                      //30 min 20 hour i.e 8:30pm on 1-5(mon-fri) on *(every month) on *(every year)
    iii) shift+ZZ to save the file
5) Try this and let me know if any modifications needed

For further details, contact me psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com