Posts

Showing posts from February, 2014

How to copy files or directories from command line in linux ?

For copying files and directories from command l ine we use cp command. The Syntax for cp command is as follows

How to view only first or last few lines in linux ?

In the previous post we saw how to view / display the contents of a text file with more and less commands. What if you don't want to view the entire file contents? Say, you want to view only the first 10 lines of the file. Or you want to see only last few lines of the file. For that purpose we use the commands head and tail.

How to view or display contents of a file in linux one screen at a time?

Image
more and less are paging commands used in Unix/*nix systems to display contents of a file one screen at a time. The difference between more and less is that, less supports both forward and backward navigation through a file. Whereas more supports forward navigation but backward navigation is very much limited.

How to edit a text file from command line in linux ?

In Unix/*nix vi is the standard and widely used commands to edit/create a plain text file from the command line. vim (Vi IMproved ) is another text editor based on vi which can be run from a Command Line Interface as well as a Graphical User Interface. 

Linux Wildcards - Standard

Image
" Unix is simple. It just takes a genius to understand its simplicity. " – Dennis Ritchie One of the advantage of Unix or *nix operating system is its simplicity. Beginners might find it hard to agree with me. But once you have familiarized with the OS and learned how to make use of it, you will discover the simplicity offered by Unix / *nix operating systems. Wildcards are one such concept which make Unix / *nix simple

cat command

cat command is one of the basic linux commands used to concatenate and write files. cat command can be used for the following major purposes View text files Create text files Append, Combine text files Copy a text file  

How to list contents of a directory ?

To list the contents of a directory in linux use the ls command. ls command when used with out any argument will display the contents of the current directory.