Lost your password?

Blogs about: Scripts And Codes

Featured Blog

SED: change/insert/append lines after matching a pattern1 comment

Mohammed wrote 1 month ago: Do you want to change/insert/append lines after matching a pattern from a file? If yes, you can use … more →

Tags: Linux, sed, change, append, insert, change line, insert address, append to address, match pattern

Linux commands: cut and paste

Mohammed wrote 1 month ago: cut and paste can be handy sometimes, especially when you have to manipulate files based on rows and … more →

Tags: Linux, Cut, paste

SED: newline and embedded newline characters

Mohammed wrote 1 month ago: The multiline Next (N) command creates a multiline pattern space by reading a new line of input and … more →

Tags: Linux, embedded newline, Multiline, Newline, pattern space, sed

How to remove non-printable/control characters from a file?

Mohammed wrote 1 month ago: You may find difficulties with non-printables in your files. You can see such characters if you open … more →

Tags: Linux, control character, non-printable, sed, Tr

TMOUT: How to set auto-logout time for SSH sessions

Mohammed wrote 1 month ago: If you want to set timeouts for user sessions on your Linux machine, you can use the variable TMOUT. … more →

Tags: Linux, bashrc, .bash_profile, Auto Logout, idle session, Timeout, TMOUT

How to find past/future dates?

Mohammed wrote 1 month ago: what day it was exactly one month ago? Are you counting down the days to find it? Or searching for a … more →

Tags: Linux, Date, day-ago, future data, month-ago, Next Date, old date, past date, previous date

Array manipulation in shell scripting

Mohammed wrote 1 month ago: Best way to understand shell scripting is from examples. Find the example below to understand differ … more →

Tags: Array, array index, Bash, shell

HISTTIMEFORMAT: add execution time to Linux's history file

Mohammed wrote 1 month ago: As you might know, Linux logs all the commands executed on a shell prompt to its history file. The f … more →

Tags: Linux, .bash_history, History, HISTTIMEFORMAT, timestamp

Rsnapshot: mysql backup script

Mohammed wrote 1 month ago: Here is a bash script to backup all MySQL databases from a remote Linux/Unix machine through rsnapsh … more →

Tags: Rsnapshot, mysqldump, backup script

Bash script to backup mysql databases

Mohammed wrote 1 month ago: Here is a bash script to backup all mysql databases, including mysqlcheck. The script has the follow … more →

SHELL GRAMMAR: simple commands and compound commands

Mohammed wrote 4 months ago: Simple Commands A simple command is a sequence of optional variable assignments followed by blank-se … more →

Tags: Linux, Bash, shell grammar, shell commands, Simple Commands, compound command, List, expression, bash manpage

Bash script to monitor your websites

Mohammed wrote 5 months ago: This script can be used to monitor your website URLs. If the site is down or if the specified url is … more →

Tags: Linux, Test Scripts, check url, check webstie, monitor website, url monitor, website monitor}, website uptime

Linux: Monitor your mount points to see if they go to read-only mode

Mohammed wrote 6 months ago: This bash script should be helpful to you if your partitions go to read-only mode frequently. This s … more →

Tags: Linux, Test Scripts, Tests, filesystem check, fs check, fsck, mount, mount monitor, Partition

Delete lines between two matching patterns1 comment

Mohammed wrote 6 months ago: Do you want to remove everything in between two matching patterns? Here is a bash script to do that. … more →

Tags: Linux, Test Scripts

Linux: Timestamp conversion methods

Mohammed wrote 6 months ago: A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occu … more →

Tags: Linux, Date, strftime, timestamp

Bash script to validate your IP address format1 comment

Mohammed wrote 6 months ago: Here is a bash script to validate your input/output IP address format. This script simply checks if … more →

Tags: Linux, Test Scripts, Check IP, ip address format, IP format, validate ip

C Program to setuid to root user (run programs owned by other users)

Mohammed wrote 6 months ago: Sometimes you will need to permit normal users to run programs that are owned by other users (or roo … more →

Tags: Linux, Test Scripts, EXECL, run programs owned by other user, setuid

A bash script for ping test

Mohammed wrote 6 months ago: Here is a simple bash script to ping multiple hosts at a time. It’s a very simple and might no … more →

Tags: Linux, Test Scripts, Ping, ping test, ping multiple hosts

PHP script to test mysql connection

Mohammed wrote 6 months ago: Here is a simple PHP script to test your mysql connection from webserver. You can download the scrip … more →

Tags: Linux, Test Scripts, MYSQL connection, mysql test, mysql_connect, PHP Script, test mysql


Related Tags
All →

Follow this tag via RSS