0% found this document useful (0 votes)
41 views2 pages

Basic Commands 1

Uploaded by

teyesi4982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Basic Commands 1

Uploaded by

teyesi4982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#mkdir -p /folder1/{folder2,folder3}/{folder4,folder5}

5. to delete a empty directory(folder)

#rmdir directoryname(foldername)

6. to delete a directory with content

#rm -rf directoryname(foldername)

[Link] create a blank file

#touch filename

8. to create a file .

#cat>filename

write any thing

ctrl+c(to save)

[Link] create or edit file in graphics mode

#gedit filename

type anything and save

10. to create or edit a file

#nano filename

write anything

ctrl+O(to save)
ctrl+x( to exit)

11. to create or edit file

vi/vim(visual editor/advance visual editor) command is used to create file

vi command operate in 3 modes

a)command mode:- to run some command


b)insert mode :- to type or write anything
c)execute mode:- to save and exit from a file

#vi filename

command mode

:se nu( to set line number)


:2( to move the cursor to that line)
/wordname (to serach a word)
:%s/old word name/new word name/g ( to find and replace a word)
yy( to copy a single line)
3yy( to copy 3 line from cursor)
p( to pase one time)
4p( to paste 4 time)
dd( to delete single line)
3dd( to delete 3 line)
x( to delete single character)
5x( to delete multiple character)
k(to move cursor upward)
j(to move cursor downward)
L(to move cursor right side)
H(to move the cursor left side)

inset mode

press i or insert key

esc (to exit from insert mode)

execute mode

:q( to quit without saving file)


:q!( to quit without saving forcefully)
:w( to save and remain in the edit mode)
:wq( to save and quit)
:wq!( to save and quit forcefully)

12. to delete a file

#rm filename
press y for confirmation

[Link] see the information o cuurent user login

#who or w

[Link] see the details of user to a perticular terminal

#who am i

[Link] clear the command screen


#clear

[Link] see present working directory

#pwd

You might also like