Recent content by granidier

  1. G

    Change working directory in shell script

    I will test what you guys suggested. Thanks again! On a side note. Let's say I'm running this script form /home/logs directory and it's also working directory for the script. If I create logic to run: ls -U | head -10 | xargs rm if log files exceeds 10 files and I run that command, will it...
  2. G

    Change working directory in shell script

    I'm not sure I understand... can you elaborate little bit more. Sorry still new to Linux.
  3. G

    Change working directory in shell script

    So I'm making a shell script that basically gets a file count in a directory and if that count exceeds x count then delete x count of files... It works great out of current directory but I need it to execute on specified directory defined in script. Currently it looks something like this...
  4. G

    Can I run ls with with multiple arguments

    I got this resolved. I was able to root and and use the combination of commands you guys suggested and wiped out the folder. I appreciate all the help
  5. G

    Can I run ls with with multiple arguments

    So after some further investigation author did create a clean up job that is supposed to keep these log files count under 1000 but at some point that process ran into a loop that killed the CPU and the VM, so the process was killed and in the mean time these logs ran out of control to the point...
  6. G

    Can I run ls with with multiple arguments

    Yea I've tried sudo but still doesn't grant permission. Linux version: NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/"...
  7. G

    Can I run ls with with multiple arguments

    tried that but don't have permission to write to a file : (
  8. G

    Can I run ls with with multiple arguments

    Really appreciate your input Jas. So little background for this. We have a 3rd party program that queries these log files that we use to troubleshoot any issues with device discovery. It's our network automation platform that logs all events and then archives them. 3rd party program does...
  9. G

    Can I run ls with with multiple arguments

    Tried it but it just hangs like ls -l
  10. G

    Can I run ls with with multiple arguments

    I'm having a problem where I have to sort through our logs folder on one of our servers which has about 32mil log files on it. ls -l command by itself does not work, which is what I need to see the date of creation. I'm able to run ls -U | head -50 for example to show 50 files at a time but it...
Top