Tuesday, March 11, 2014

LEARN LINUX MOST IMPORTANT COMMANDS

BELOW YOU CAN FIND IMPORTANT UNIX  / LINUX COMMANDS THAT ONE SHOULD MEMORIZE IN ORDER TO WORK EFFICIENTLY ON UNIX / LINUX SYSTEMS


*************** How To Create new Users in Linux / Unix ************************

Add New User in Linux (ubuntu)















NOTE ::
 If you are not logged in as a "root" user you should append "sudo" in the "adduser" command like below :
# sudo adduser user-a

*************** How To Switch Users in Linux / Unix *****************************

Switch users in Linux








$ whoami

user-a

// whoami command will tell you the name of logged in user

$ su - user-b
Password:

// use command to switch user  , it will ask to key-in password 

$ whoami
user-b

$ exit
logout

// exit will logout the user

Note : $ sudo  // this means super user do . You can run any command as super user whenever required like this
$ sudo service tomcat7 restart


************************ Directory Navigation ********************************


Directory Navigation in Linux














The directory you are standing in is called the working directory. To find the name of the working directory, use the pwd command.
$ pwd
/home/user-b

// pwd stands for present working directory , this command will display the working directory with complete path to the directory from root.


$ cd

example :
1. $ cd /tmp/user  - this command will take you inside directory

TIP ! ::: Press TAB to display list of available directories in your current directory.

// cd stands for change directory , it will take you to the directory you want by specifying the path of directory with its name.

$ ls

// ls command will list all available directories & files in your working directory, if you want to list files / directories present at a path other than working directory than simply specify the path with directory name to list all available files/directories 
example : $ ls /tmp/user-a/

Above command will display all available directories & files at /tmp/user-a/


************************* File & Directory Operations *******************************

Now that we have learned how to create new user , switch to that user, navigate to the desired location in linux file system, we should now learn how to operate on files & directories present on linux system. You can consider this part as the most important in your linux knowledge as this will help you in your everyday working routine of linux


Create a new directory
$ mkdir  
Make Directory in Linux












Above command will create a new directory with name dir3 at path /tmp/linux-command/ as it is your working directory. You can create directory at any other path by simply specifying the path in your command as shown below

user-b@Ubuntu1204:/tmp/linux-command$ mkdir dir3/dir4
user-b@Ubuntu1204:/tmp/linux-command$ ls dir3/
dir4
user-b@Ubuntu1204:/tmp/linux-command$

This will create directory "dir4" inside directory "dir3" 



Create a new file :

$ touch
$ touch newfile4
Create new file using "touch" command in linux











Above command will create a new blank file "newfile4" at /tmp/linux-command$



Edit / view file :

$ vi

This will open file in view mode using "vi" editor available in linux
Press "i" to enable insert mode in order to insert / delete some text in file .
Press "Esc" ":wq!" & enter to same your entries & exit. (wq will write & quite the file)

user-b@Ubuntu1204:/tmp/linux-command$ vi newfile4

vi editor - insert
Vi editor - Insert 

vi editor - save & quite
Vi editor - save & quite














$ cat

user-b@Ubuntu1204:/tmp/linux-command$ cat newfile4
$ cat newfile4
Cat command to view files contents in linux






cat command will display the contents of your file on your command line

You can also view the contents by restricting them to some number of lines from files head/top or tail/bottom 

head / tail to view files
Head / Tail to view file in Linux














user-b@Ubuntu1204:/tmp/linux-command$ head -1 newfile4
This is dummy file for learning linux - Tushar Agrawal
// This way it will display only the first line of the file.

user-b@Ubuntu1204:/tmp/linux-command$ head -3 newfile4
This is dummy file for learning linux - Tushar Agrawal
second line
3rd line
// This way it will display the first 3 lines of the file 


user-b@Ubuntu1204:/tmp/linux-command$ tail -1 newfile4
4th line
// This way it will display last one line of the file

user-b@Ubuntu1204:/tmp/linux-command$ tail -2 newfile4
3rd line
4th line
// This way it will display last 2 line of the file


user-b@Ubuntu1204:/tmp/linux-command$


Rename file / Directory


$ mv  
user-b@Ubuntu1204:/tmp/linux-command$ mv newfile4 newfile4-renamed
$ mv newfile4 newfile4-renamed
mv command to rename file












Above command will rename file "newfile4" to "newfile4-renamed", same way we can rename a directory as shown below

mv command to rename directory
















Copy file from any location

$ cp

copy files in Linux











Above command will copy file "newfile4-renamed" from "/tmp/linux-command/" to "/tmp/linux-command/dir11/"


Zip / UnZIP / tar / untar directory / files

Command to create a tar file 
$ tar -cvf .gz
$ tar -cvf
Create tar file 

















Command to extract contents of a tar file
$ tar -xvf
Extract tar file
















Deleting directory & files

$ rm

Remove file in Linux
















Above command can not be used to delete directory, to remove a directory use below command which uses recursive force "rf"

$ rm -rf  
Remove directory in Linux
















File Permission 

$ chmod 777  // for all permissions (read + write + execute)

Following are the symbolic representation of three different permissions:
r is for read permission,
w is for write permission,
x is for execute permission.





************ Unix Linux Administration ******************

apt-get update // to update linux store

apt -get upgrade // to upgrade linux store

++ More to come+++

Thursday, May 21, 2009

SOFTWARE QUALITY

  • Technical Factors:
Meet customer requirements in terms of Functionality
Meet customer expectations in terms of Performance, Usability, Security, etc…
  • Non-Technical Factors:
Reasonable cost to purchase.
Time to release.

Software Quality Assurance (SQA):
The Monitoring and Measuring the strength of development process is called Software Quality Testing. Ex: Life Cycle Testing.

Software Quality Control (SQC):
The validation of final product before releasing to the customer is called as SQC. Page 3

SOFTWARE TESTING—WHAT, WHY, AND WHO

WHAT IS SOFTWARE TESTING?

Software testing is a process of verifying and validating that a software application or program.

1. Meets the business and technical requirements that guided its design and development, and

2. Works as expected.

Software testing also identifies important defects, flaws, or errors in the application code that must be fixed. The modifier “important” in the previous sentence is, well, important because defects must be categorized by severity(more on this later).

During test planning we decide what an important defect is by reviewing the requirements and design documents with an eye towards answering the question “Important to whom?” Generally speaking, an important defect is one that from the customer’s perspective affects the usability or functionality of the application. Using colors for a traffic lighting scheme in a desktop dashboard may be a no-brainer during requirements definition and easily implemented during development but in fact may not be entirely workable if during testing we discover that the primary business sponsor is color blind. Suddenly, it becomes an important defect. (About 8% of men and .4% of women have some form of color blindness.)

The quality assurance aspect of software development—documenting the degree to which the developers followed corporate standard processes or best practices—is not addressed in this paper because assuring quality is not a responsibility of the testing team.

Great Saying

“It is not enough to do your best. You must know what to do and then do your best.”
---W. Edwards Deming

“A clever person solves a problem. A wise person avoids it.”
---Albert Einstein