Tag: Shell

Sending email or mail with attachment from command or shell prompt

If you are looking to send email with attachment via shell script or at shell prompt/command line (read as bash prompt), use mutt command. Mutt is a small but very powerful text based program for reading electronic mail under UNIX /Linux operating systems, including support for color terminals, MIME, and […]

Linux : How to run a command when boots up?

Other distribution provided the file called /etc/rc.local but Debian does not use rc.local to customize the boot process. You can use simple method as follows to customize it. (A) Execute command at system startup Let us assume you would like to run command called i) Create a script called mystartup.sh […]

FreeBSD: Customize Home, Del, Insert keys for BASH shell

By default when you use FreeBSD’s BASH shell and if you hit Home, Del, Insert keys all of them just prints ~ (some garbage is printed ). To get rid of this problem, edit /etc/profile file and define key binding. 1) Open your bash global profile file: # vi /etc/profile […]

Shell script to remove whole ftp directory structure

#!/bin/bash # Shell script to remove whole (nuke) ftp directory structure # See url for more info: # http://www.cyberciti.biz/tips/how-to-nuke-a-ftp-server.html # ———————————————– # Copyright (c) 2006 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ————————————————————————- # This script is part of nixCraft shell […]

Where is color of ls command defined?

1) Configuration file for the ls color command is /etc/DIR_COLORS for Linux. You can modify those colours if you want. 2) Here is list of most common colors: (RHEL 3.x/FCx/RH and other linux distros) Executable files: Green * Normal file : Normal * Directory: Blue * Symbolic link : Cyan […]