Viewing 1 to 15 of 15 items
Tag Archives: Linux

Find All Large Files On A Linux System

Steps to follow Option 1 This is a basic method for listing files of a certain size. Here we’re searching the home directory of the user you’re currently logged in as for files greater than 20MB. find ~ -size +20M Note: Alternatively, you may search for files less than a certain size by changing the + to a – and  Full Article…

0

grep inside for-loop

dont use capital letter vars. those are better used by the environment. never try to parse ls output. use globbing instead. if you’re writting bash, then prefer [[ over [. do not cat file to read it. instead read it in a while loop. always quote your variables. they’re also easier found if grouped. treat a list of files, as an array. if you  Full Article…

0

check process

check_process.sh check_process.sh The script checks whether a specific process is running. It just parses output of ps. If the process is not running, the script runs a command to start the process. Features: – check whether a process is running – try to start the process with a specified command – return the result of  Full Article…

0

Sending simple message body + file attachment using Linux Mailx

I am writing a shell script to send an email using Linux Mailx, the email must contain a file attachment and a message body. Currently sending an email with an attachment: output.txt | mail -s “Daily Monitoring” james@dell.com I wish to add a message body. How should i? Linux Mailx: mail [-eIinv] [-a header] [-b addr] [-c addr] [-s subj] to-addr  Full Article…

0

tar command examples

This is not a comprehensive list by any means, but this should give you a jumpstart on some of the common Linux commands. Bookmark this article for your future reference. 1. tar command examples Create a new tar archive. $ tar cvf archive_name.tar dirname/ Extract from an existing tar archive. $ tar xvf archive_name.tar View  Full Article…

0

Linux: Kill Process based on Start Time (STIME)

One of the server that I am working with has some infinitely running PHP process. Due to incorrect way of cron setup by the development team, it has caused the process hanging and not ended properly. According to them, these processes can be killed if still hang after 12 hours. Any process which run in server will  Full Article…

0