≡ Menu


Linux: Show All Members of a Group

I am a new Linux user and created couple of groups on server. I need to find out all members of a group called "ftponly". How do I list all members of a group on Linux or Unix-like systems?
[click to continue…]

Unix / Linux: Show First 10 or 20 Lines Of a File

I have a directory with many files. I am trying to write a shell script that will only show first 10 or 20 lines of a file. How do I display first 10 or 20 lines of a file on Linux or Unix-like systems?
[click to continue…]

Linux / Unix: Rsync Copy Files & Directories Names With WhiteSpaces and Blanks

I need to transfer a file called 'some cool movie.avi' that contains whitespace under rsync. How do I escape a filename or directory name with spaces in them while using rsync command under Linux / *BSD / Unix like operating systems? How do I use rsync when files / dirs contain spaces?
[click to continue…]

Ubuntu Linux: Disable Apparmor For Specific Profile / Service Such As Mysqld Server

AppArmor ("Application Armor") is a security module for the Linux kernel and integrated into both kernel and Ubuntu Linux. How do I disable AppArmor protection for mysql profile / service under Ubuntu or Novell Suse Enterprise Linux?
[click to continue…]

Linux / Unix vi / vim: Open and Switch Between Multiple Files

I am new to Linux sysadmin work. I am using vi / vim text editor to edit files located in /etc/ directory. I open files using

vi /etc/resolv.conf /etc/hosts

I can edit the /etc/resolv.conf file only. How do I switch between the two open files while using vim text editor under Linux / BSD / Apple OS X / Unix like operating systems?
[click to continue…]

Rsync: Preserve / Copy Hard Links ( Backup Rsnapshot Directory Tree )

I'm using rsnapshot filesystem snapshot utility to make incremental snapshots of local and remote filesystems for 10 production servers running on RHEL 5.x system. The rsnapshot commands makes extensive use of hard links, so if the file doesn't change, the next snapshot is simply a hard link to the exact same file. How do I use the rsync command to copy my the entire snapshot directory /raid6/rsnapshot/ (around 4TB) to a remote server for mirroring purpose?
[click to continue…]

Linux Command To Shutdown HP/IBM/Sun/Dell Server System

How do I shutdown a Linux powered server using command line option?
[click to continue…]

Use export Command in Linux / Unix

How do I use export command under a Linux or Unix-like operating systems to set variables on a bash shell?
[click to continue…]

HowTo: Linux Mount devpts File System On /dev/pts

How do I mount the devpts file system under Linux operating systems using bash command prompt? How can I mount the devpts on /dev/pts using /etc/fstab file under Linux operating systems?
[click to continue…]

Linux: Bash Get Time

How do I get the system time in BASH? How can I get the Linux system using bash shell?
[click to continue…]