Articles

Archiving

Create a compressed archive (tape archive): tar zcvf archive.tar.gz dirtar jcvf archive.tar.bz2...

Commands for Handling files and directories

Create a directory:  mkdir dir Create nested directories: mkdir -p dir1/dir2Changing...

Commands for changing file access rights

Add write permissions to the current user:chmod u+w fileAdd read permissions to users in the file...

Compressing

Compress a file:gzip file (.gz format)bzip2 file (.bz2 format, better)lzma file (.lzma format,...

Displaying file contents

Concatenate and display file contents:cat file1 file2Display the contents of several files...

File name pattern matching

Concatenate all “regular” files: cat *Concatenate all “hidden” files: cat .*Concatenate all files...

Fundamental Commands of Linux/Unix (with Examples & Syntax)

If you know the proper commands, File Management becomes easier. Following are the basic Linux...

Handling file contents

Show only the lines in a file containing a given substring: grep substring fileCase insensitive...

Job control

Show all running processes: ps -efLive hit-parade of processes (press P, M, T: sort by Processor,...

Linux File Hierarchy Structure

The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the...

Listing files

List all “regular” files (not starting with .) in the current directory:lsDisplay a long...

Looking for files

Find all files in the current (.) directory and its subdirectories with log in their name:  find...

Redirecting command output

Redirect command output to a file:ls *.png > image_filesAppend command output to an existing...

Understanding File and Partition Sizes in Linux

Understanding File and Partition Sizes in Linux Managing disk space efficiently in Linux...

commands for comparing files and directories

Comparing 2 files: diff file1 file2Comparing 2 files (graphical):gvimdiff file1 file2tkdiff file1...