Home » Linux Basics (page 4)

Linux Basics

How To Use the grep Command in Linux

How do I use grep command in Linux operating systems? Can you give me a simple example of grep command? The grep command searches the given file for lines containing a match to the given strings or words. By default, grep displays the matching lines. Use grep to search for lines of text that match one or many regular expressions, …

Read More »

Linux: Tarball Delete ( remove ) File

How do I delete or remove a single file from within a tar ball under Linux operating systems? You can use the following syntax to delete a file from a tar ball:   tar --delete -f example.tar filename Example: Delete a File From a Tar Ball First, create a tar ball for testing purpose using the tar command, enter: # cd …

Read More »

Linux: Finding and Locating files with find command part # 1

Many newcomers find it difficult use the find command at shell prompt under Linux. Find is nifty tool on remote server where UNIX admin can find out lot of information too. Find command can perform a search based on a variety of search constraints. It searches through one or more directory tree(s) of a filesystem, locating files based on some user-specified criteria. …

Read More »

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 …

Read More »

Bash Scripting Basics: Part 1

If you have been using computers for a while, whether you have been using Unix, Windows or Mac operating systems, you’re probably already familiar with the term shell. A shell is piece of software that is inbuilt into most operating systems which acts as an interface to the kernel and other software. Shells come in various shapes and sizes, but in …

Read More »