You can runa php file by pressing F5 key
Tag Archives: Linux
Linux command to list only files
ls -la |grep ^-
Linux command to list only directories
ls -la -d */
or
ls -la |grep ^d
Replace a string with another in vi editor
:%s/str1/$str2/g will replace all the occurance of str1 with str2
Go to a particular line VI Editor
Type the following
:45
vi editor show line number
Type any one of the following
set number or set nu
php install gmp extension ubuntu
Run the command
php install gmp extension ubuntu
Find out mysql version linux
mysql -V
mysql Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (i686) using readline 6.1
Install subversion
Run the below given command
sudo apt-get install subversion
VI Editor
Paragraph
Next – }
Previous – {
Sentence
Next sentance – )
Previous sentance – (
Inserting and appending text
inserts text to the left of cursor – i
nserts in the beginning of line -I
appends text to right of cursor -a
appends to the end of line- A
Adding new line
add a new line below the current line -o
adds a new line above the current line – O
file
Go to end of file – :$
on chacter forword – :w
One word forword – :W
go to a line number – :ine_number
display file info – :^g
Moving Cursor in File
Left – h
Right – l
Up – k
Down – j
Line
Beginning – ^ or B
end – $
Deleting the text :
deletes text above the text – x
deletes text character on right of cursor- X
deletes line- 20 20d
deletes current line- dd
delete till end of current -line. D
Replacing a character & word
replace the character above the cursor – r
replces characters until Esc is pressed – R
replaces the word from cursor to the end indicated by $ sign – cw
replaces till end of line – C
Substitute
subistutes current charcater – s
substitutes entire line – S
Undo last changes
undo last change – u
undo changes to the current line – U
Copy and pasting lines
copys the current line into buffer – yy
copies 5 lines from the current line – 5yy
pastes the current buffer – p
Searching
Searches for the word name in the file – /name
n continues search forward – n
N searches backwards – N
Saving
saves the text does not quit -:w
saves & quit the editor – :wq!
save ZZ
Quit without saving – q!
Search & Replace – s/<search>/<replace>/g .
Repeating last command .
Recovering a unsaved vi file – vi -r filename