Monday, May 12, 2014

Utilities Command For Linux

Other Utilities Commands in Linux

  • clear Clear the scree
  • echo Display text on the screen. Mostly useful when writing shell scripts. For
example: echo “Hello World”
  • more Display a file, or program output one page at a time.
Examples: more mp3files.txt
ls -la | more
  • less An improved replacement for the “more” command. Allows you to scroll backwards as well as forwards.
  • grep Search for a pattern in a file or program output. For example, to find out
which TCP network port is used by the “nfs” service, you can do this:
grep .nfs. /etc/services
This looks for any line that contains the string “nfs” in the file “/etc/services” and displays only those lines.
  • lpr Print a file or program output.
Examples: lpr mp3files.txt - Print the mp3files.txt file
ls -la | lpr - Print the output of the “ls -la” command.
  • sort Sort a file or program output. Example: sort mp3files.txt
  • su “Switch User”. Allows you to switch to another user's account temporarily.
The default account to switch to is the root/superuser account. Examples:
su - Switch the root account
su - - Switch to root, and log in with root's environment
su AMDI - Switch to AMDI account
Utilities Command For Linux

Utilities Command For Linux

Wednesday, January 22, 2014

What is Command in Linux

What is Linux Command

      A command is an instruction given by a user telling a computer to do something, such a run a single program or a group of linked programs. Commands are generally issued by typing them in at the command line (i.e., the all-text display mode) and then pressing the ENTER key, which passes them to the shell.

An important feature of Unix-like operating systems is the large number of standard commands that are available, as well as the numerous options for many of them, as compared with other operating systems.

The shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.

On most Linux systems a program called bash (which stands for Bourne Again SHell, an enhanced version of the original Bourne shell program, sh, written by Steve Bourne) acts as the shell program. There are several additional shell programs available on a typical Linux system. These include: ksh, tcsh and zsh.
What is Command in Linux
A command consists of a command name usually followed by one or more strings (i.e., sequences of characters) that comprise options and arguments. Each of these strings is separated by white space (which consists of one or more spaces or tabs). The general syntax for commands is

command [options] [arguments]

The square brackets indicate that the enclosed items are optional. Most commands have at least a few options and can accept (or require) arguments. However, there are some commands that do not accept arguments, and a very few with no options.

The clear command, which is used to remove all previous commands and output from the display screen, is one of the rare commands that accepts neither options nor arguments. That is, it can only be used as follows:

clear

The shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.
  • A program that interprets commands
  • Allows a user to execute commands by typing them manually at a terminal, or automatically in programs called shell scripts.
  • A shell is not an operating system. It is a way to interface with the operating system and run commands.

What is Command in Linux

What is a command shell in Linux

What is a command shell in Linux

  • A program that interprets commands
  • Allows a user to execute commands by typing them manually at a terminal, or automatically in programs called shell scripts.
  • A shell is not an operating system. It is a way to interface with the operating system and run commands.
What is a command shell in Linux

command shell in Linux

Three Most Basic Commands on Linux

Three Most Basic Commands on Linux

             Linux is one of the most popular operating system which is powering a majority of internet servers. As the internet grows , system administrators who have a good grasp of the Linux operating system are always in high demand in the industry. In this tutorial you can learn three most basic Linux Commands.

Linux and Unix users and system admins cannot live without this types commands. Whether you can use it many more times in a day. 

Three Most Basic Commands on Linux
  • The pwd Command (The pwd is an acronym for print working directory. The pwd command (print working directory) is used to output the path of the current working directory.)
  • The ls Command (The ls command lists all files in the directory that match the name. If name is left blank, it will list all of the files in the directory.)
  • The cd Command (To change directories in a Linux environment, use the cd command.)

Three Most Basic Commands on Linux

pwd Command in LInux

What is pwd Command in LInux

  • The abbreviation of pwd command is present working directory. [or]
  • The pwd is an acronym for print working directory. 
  • The pwd command is considered as one of the most frequently used commands on Linux and UNIX System. 
Command Usage
  • To view the present working directory.
  • The pwd command (print working directory) is used to output the path of the current working directory.
Command options can usually be combined or listed separately.

Unix & Linux commands have the general format:

command  [options]  [item]

Syntax Of pwd Command
  • The syntax for the pwd command is: pwd
Examples Of pwd Command

To print current working directory, enter in your Linux Terminal:

$ pwd

Sample outputs:

/home/LinuxHelpers

the computer prints out /home/LinuxHelpers, that means that the directory the user is currently in is /home/LinuxHelpers.

pwd Command in LInux

Tuesday, January 21, 2014

LS Command Options in Linux

LS Command Options in Linux

Commands are case sensitive. The command ls is different from LS. In fact LS is not recognised as a valid command.

ls is specified by POSIX and the Single UNIX Specification.

Abbreviation of ls Command is - list directory contents

In Linux operating systems maintain the idea of a current working directory, that is, where one is currently positioned in the hierarchy of directories.

When invoked without any arguments, ls lists the files in the current working directory. A directory that is not the current working directory can be specified and ls will list the files there. The user also may specify any list of files and directories. In this case, all files and all contents of specified directories will be listed.



Linux and Unix users and system admins cannot live without this two letter command. Whether you use it 10 times a day or 100 times a day, 

Command options can usually be combined or listed separately.

Unix commands have the general format:

command  [options]  [item]

Command: ls
Command Usage:
The ls command lists all files in the directory that match the name. If name is left blank, it will list all of the files in the directory.
The syntax for the ls command is: ls [options]
OR
Go to Terminal Type : ls
Then you will get the Directory Details in Your Terminal
To Display Line By Line Files in Terminal
There are so many option in the Command so Type this command in your terminal: ls -1
There are so many option in the Command so i am explaining here few option with description.

LS Command Examples

Option Description
a Displays all files. b Displays non printing characters in octal. c Displays files by file time stamp. C Displays files in a columnar format (default) d Displays only directories. f Interprets each name as a directory, not a file. F Flags file names. g Displays the long format listing, but exclude the owner name. i Displays the inode for each file. l Displays the long format listing. L Displays the file or directory referenced by a symbolic link. m Displays the names as a comma-separated list. n Displays the long format listing, with GID and UID numbers. o Displays the long format listing, but excludes group name. p Displays directories with / q Displays all non printing characters as ? r Displays files in reverse order. R Displays sub directories as well. t Displays newest files first. (based on time stamp) u Displays files by the file access time. x Displays files as rows across the screen. 1 Displays each entry on a line.

LS Command Options in Linux

Sunday, January 5, 2014

Change Directory Command in Linux

How to Change Directory in Linux

Linux is one of the most popular operating system which is powering a majority of internet servers. As the internet grows , system administrators who have a good grasp of the Linux operating system are always in high demand in the industry. In this tutorial you can learn how to change the directory in Linux environment .

Command: CD

Command Usage:
  • Which is used to change the current directory. This is equivalent to the CD and CHDIR commands in MS-DOS.
  • To change directories in a Linux environment, use the cd command.
  • The abbreviation of CD is Change Directory 
The cd command allows you to change directories. When you open a terminal, you will be in your home directory. To move around the filesystem, use cd.

Below are some basic examples of how this command can be used to change directories in Linux OS.
  •  To navigate to your desktop directory, use cd ~/Desktop
  •  To navigate into the root directory, use cd /
  •  To navigate to your home directory, use cd
  •  To navigate up one directory level, use cd ..
  •  To navigate to the previous directory (or back), use cd -

When you need to move into multiple directories with single command, you can use a command to the below example for your directory.
cd Documents/Picture

When you need to move back a directory, you can use the below command example in your terminal.
cd...

CD Command in Linux

Change Directory Command in Linux

Related Post

Linux Tips and tricks,Online Linux Helpers