Recent content by ilovelinux

  1. I

    var scripting

    Hi, I would like to seek for your assistance on my ongoing ls bash scripting. I need to create a script to get the content of my var folder. Please help me on this. This will run every minute. Here is my current script: #!/bin/bash ls -lar /var Or please suggest any script that I could...
  2. I

    bash scripting

    ==================================================================== Hi Jaskinakis, I will be needing two scripts. 1. To start the tcpdump at 1AM 2. To stop the tcpdump at 2AM and zip the tcpdump logs (item #1). With this, I would be able to know how the server behavior and get the info on...
  3. I

    bash scripting

    Hi JasKinasis, addition question please. I need to know what's happening on the server every thursday between 1AM-2AM and I want it to zip the captured tcpdump. Hope to hear from you soon. Thank you in advance. #!/bin/bash pid=$(ps -ef | \grep tcpdump | \grep -v grep | awk '{print $2}') if [[...
  4. I

    bash scripting

    Hi Jaskinasis, It is now working!!!! Thank you very much for all your help!!! really appreciate it! :)
  5. I

    bash scripting

    ================================================================================== But what you really want is something to get the PID of an already running tcpdump and kill it at a specified date/time. Is that correct? - Yes, you are correct. I tried the script and it is now working, manually...
  6. I

    bash scripting

    Hi Jaskinakis, Thank you for your help. By the way here is my sample script I did: #!/bin/bash #get the process ID pid=$ (ps -ef | grep -x '[p]ing' | awk ' { print $2 } ' #terminate kill -15 $pid (ps -ef | grep '[p]ing' | awk '{ print $2 } ' ping = $pid (date +'%Y-%m-%) I need to kill the...
  7. I

    bash scripting

    Hi, I am new to bash scripting. I am seeking for your help on how to create a tcpdump scripting. The objective is to kill the tcpdump process at a certain time. I hope you could help me on this please. Thank you in advance
Top