≡ Menu

UNIX / Linux: How to Use Sticky Bit on Directory and File

You would set the sticky bit primarily on directories in UNIX / Linux.

If you set the sticky bit to a directory, other users cannot delete or rename the files (or subdirectories) within that directory.

When the sticky bit is set on a directory, only the owner and the root user can delete / rename the files or directories within that directory.
[continue reading…]

On Red Hat based Linux, iptables comes with certain default rules. It is good idea to clean them up, and start from scratch.

This article is part of an ongoing iptables tutorial series. This is the 2nd article in that series. In our 1st part, we discussed about IPTables Tables, Chains, Rules Fundamentals.

Before we start learning how to add firewall rules using iptables, it is helpful to understand how to cleanup all the existing default rules and start everything from scratch.
[continue reading…]

Rsync is very powerful tool to take backups, or sync files and directories between two different locations (or servers).

You know this already, as we presented you with practical examples on rsync earlier.

In a typical backup situation, you might want to exclude one or more files (or directories) from the backup. You might also want to exclude a specific file type from rsync.

This article explains how to ignore multiple files and/or directories during rsync with examples.
[continue reading…]

iptables firewall is used to manage packet filtering and NAT rules. IPTables comes with all Linux distributions. Understanding how to setup and configure iptables will help you manage your Linux firewall effectively.

iptables tool is used to manage the Linux firewall rules. At a first look, iptables might look complex (or even confusing). But, once you understand the basics of how iptables work and how it is structured, reading and writing iptables firewall rules will be easy.

This article is part of an ongoing iptables tutorial series. This is the 1st article in that series.

This article explains how iptables is structured, and explains the fundamentals about iptables tables, chains and rules.

[continue reading…]

Expect scripting language is easy to learn. It expects specific string, and sends (or responds) strings accordingly.

If you are new to expect, read our 6 expect script examples (including hello world example) to get a jump start.

This article explains the following in the expect scripting language.

  • Expressions – arithmetic operation
  • if construct in expect
  • looping constructs

[continue reading…]

In our previous regular expression part 1 article, we reviewed basic reg-ex with practical examples.

But we can do much more with the regular expressions. You can often accomplish complex tasks with a single regular expression instead of writing several lines of codes.
[continue reading…]

To run various open source applications you might have to install Apache, MySQL, PHP, and Perl (or some combination of these). For those who have difficulties installing and configuring these separately, XAMPP might be helpful.

XAMPP is Apache distribution that contains MySQL, PHP and Perl. You really don’t need to worry about configuring MySQL, PHP, or Perl for Apache. Just install XAMPP, and everything is already pre-built and ready to go. It is that easy!

Also, XAMPP is available for Linux, Windows, Mac OS, and Solaris.
[continue reading…]

Question: How do I check whether my HP Unix operating system HP-UX is running on 32-bit or 64-bit?

Answer: If you’ve installed it, you should know, as the installation CD (or ISO image) for a 32-bit HP-UX and 64-bit HP-UX are different. Let us assume that your sysadmin installed the OS, and you didn’t know whether he used a 32-bit or 64-bit HP-UX.
[continue reading…]