≡ Menu

shell scripts

I'm new to Linux and my boss told me to remove ssh server as we don't need to provide the remote login and file transfer capabilities of SSH. How do I disable and remove OpenSSH server?
[click to continue…]

Can you tell me differences between the following sysvinit /sbin/service command:

service httpd restart

service httpd condrestart

service httpd reload

[click to continue…]

Linux: What is Dash ( /bin/dash ) Shell?

What is /bin/dash? I noticed that the default system shell /bin/sh was changed to /bin/dash. Why was this change made?
[click to continue…]

UNIX / Linux: Increment The Date

I want to increment the date under UNIX or Linux operating system while writing shell scripts. For example Apr/27/2011 should be incremented as Apr/28/2011 and so on. How do I increment a date in UNIX or Linux shell?
[click to continue…]

I noticed that many shell scripts in /etc/init.d/ directory use the following syntax:

echo $"Usage $prog start|stop|reload|restart"

Why a double-quoted string preceded by a dollar sign ($"string") using the echo command under Linux / UNIX bash scripts?
[click to continue…]

UNIX / Linux: Shell Scripting With mail Command

How do I send e-mails from a shell script including file attachments?
[click to continue…]

I want to copy (rsync to remote server) a directory tree whenever file uploaded or deleted in /var/www/html/upload/ directory under Linux operating systems for backup purpose and/or load balancing purpose without getting into complex file sharing setup such as NFS or GFS iscsi storage. How do I monitor /var/www/html/upload/ and its subdirectory for new files and executes rsync command to make copy back to www2.example.com:/var/www/html/upload/?
[click to continue…]