Skip to main content

Linux Commands

 1. cd command

This Command is used to change Directory.

Syntax:

cd <Directory Name>

Output:




 2. mkdir command

This Command is used to create new directory.

Syntax:

mkdir <Directory Name>

Output:




 3. ls command

This Command is used to check the list of present files in particular Directory

Syntax:

ls

Output:







 4. rm command

This Command is used to remove directory or file

Syntax:

rm -r <directory_name>,rm <file_Name>

Output:





 5. pwd command

This Command is used to know the current location

Syntax:

pwd

Output:




 6. vi command

This Command is used to edit and create text file

Syntax:

vi <FileName>

Output:





 7. cat command

This Command is used to display text files.

Syntax:

cat <FileName>

Output:




 8. cp command

This Command is used to copy file or directory to some other place.

Syntax:

cp <file/dir name/path> <location path >

Output:









 9. mv command

This Command is used to move and rename a file or directory.

Syntax:

mv <file/dir name/path> <location path >   --- for moving file

mv <file/dir name> <Another Name>         --- for renaming

Output:










10. vi command

vi(vim)            --------sysntax vi <filename/filepath>

i (insert)          --------Press i button to go in insert(editing) mode

esc(button)     ---------To come out of insert mode

shift+:w          ---------pres button to write in file

shift+:q           ---------press button to quit from file

shift+wq         ---------press button to write and quit from file

shift+q!           ---------press button to quit forcefully from file

shift+wq!        ---------press button to write and quit forcefully from file.


Use the following commands in command mode:

h - Moves the cursor to the left by one character; you can also press the left arrow.

j - Moves the cursor one line down; you can also press the down arrow.

k - Moves the cursor one line up; you can also press the up arrow.

l - Moves the cursor to the right by one character; you can also press the right arrow.

w - Moves the cursor one full word to the right.

b - Moves the cursor one full word to the left.

0 - Moves the cursor to the beginning of the current line.

$ - Moves the cursor to the end of the current line.

~ - Changes the case of the current character.

dd - Deletes the current line.

D - Deletes everything on the line to the right of the cursor’s current position.

x - Deletes the current character.

u - Undo the last command.

. - Repeats the last command.

:w - Saves current file, but does not exit.

:wq - Saves current file, and quits.


The following commands place you into insert mode:

i - Inserts to the left of the current cursor position.

a - Appends to the right of the current cursor position.

dw - Deletes the current word.

cw - Changes the current word.


 9. grep command

This Command is used to grep word or line from a or many files.

Syntax:

grep <description> <word/line> <FileName/Path>

-c : This prints only a count of the lines that match a pattern

-h : Display the matched lines, but do not display the filenames.

-i : Ignores, case for matching

-l : Displays list of a filenames only.

-n : Display the matched lines and their line numbers.

-v : This prints out all the lines that do not matches the pattern

-o : Print only the matched parts of a matching line,

 with each such part on a separate output line.

-A n : Prints searched line and nlines after the result.

































-e exp : Specifies expression with this option. Can use multiple times.

-f file : Takes patterns from file, one per line.

-B n : Prints searched line and n line before the result.

-C n : Prints searched line and n lines after before the result.





















Comments

Popular posts from this blog

Protocol Testing Steps(Testers Duty)

Co mplete Cycle 3GPP Spects HLD (High Level Design) LLD(Low Level Design) Feature Development(Developer Work) Testing(Testers Job) Here we will only discuss about Testers Job responsibility. If You want breifing of all thing mentioned above please comment I ll prepare a seperate post for it. Testing(Testers Job) Below Stesps a tester follows to do a testing work. Test Case Writing Test Bed Setup Flashing Build Configuration Running Script(Or Manual Test) Collect The Logs Analyse The Logs Bug Reporting to Development Team When Tester does testing and reports Issue to Development team and then development team rectifies issue and again send to testing team for testing, this process continues till the issue resolved. 1.  Test Case Writing(In case of Manual Testing)           To perform a Testing there should be a Layout What thing should a Tester test. To perform a testing tester should follow test cases. These test cases are prepared in excel sheets. Test cases can be prepared on the bas

Protocol Testing

Protocol Testing  1. What is Protocol Testing                                         Protocol - Protocol is set of rules for communicating with any tow electronics device Exchange of data under some rules and guidelines defined by some authorities.                       Protocol Testing - Testing of  Packet structure (Protocols implemented in Device as a               Software). Protocol Testing is nothing just verifying proper implementation of Set of rules defined by Some authorities(eg- 3GPP, ETSI and IEEE). 2.Need Of Protocol Testing                                                  Every Chip set Company like Qualcomm, Intel, NVIDIA etc. Implement protocols to its        Chip set Developed by their Developers and they test that  these Chip sets are working properly or not. So for the testing purpose they do Protocol Testing for each and every Build (Set of rules), After testing again and again they(Protocol Testing Engg) send issues to Development team and again Development team r