0% found this document useful (0 votes)
2 views

unix _ gvim

The document is a presentation on UNIX and GVIM commands, highlighting the advantages of UNIX such as multi-user support, security, and efficient memory usage. It provides a comprehensive list of commands for UNIX and Git, along with detailed GVIM commands for text editing and navigation. The presentation concludes with a thank you note.

Uploaded by

Sachin Igoor
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

unix _ gvim

The document is a presentation on UNIX and GVIM commands, highlighting the advantages of UNIX such as multi-user support, security, and efficient memory usage. It provides a comprehensive list of commands for UNIX and Git, along with detailed GVIM commands for text editing and navigation. The presentation concludes with a thank you note.

Uploaded by

Sachin Igoor
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

UNIX & GVIM COMMAND

Presenter : Lekshmi S Ajay


WWID : 12122790
DATE: 2022ww42.3
WHY UNIX ??
 Supports multiple users
 Supports multiple tasks
 More Secure
 Less Memory
 File access & Retrieval easier.

PESG | Product Enablement Solutions Group Intel Confidential 2


UNIX COMMANDS
 pwd – full path of current working directory
 cd – change directory
 cd ~ - goes to home directory
 cd ../ - moves one directory backward
 alias – creates command line shortcut
 wd – working directory(alias of cd p/cdft/dteg/users_disk/$USER with
cshrc setting)
 tab – for auto completion
 rp – gives realpath of the file

PESG | Product Enablement Solutions Group Intel Confidential 3


 ls – list the contents of directory
 ll - list files in long format
 ls –a – list all files
 ls –alh – list all files in human readable form
 ls –lrt - gives a long listing, oldest first
 ls –lt - gives long list,newest first
 ls –ld - lists information about the folder alone and not files
 tree – list contents of a directory in a tree like fashion
 tree –L <no of branches> - lists contents only upto specified no : of
branches
 chmod - change file permissions
PESG | Product Enablement Solutions Group Intel Confidential 4
 mkdir – creates a new directory
 rm -rf – removes a file or directory
 rmdir - removes an empty directory
 mv – used to transfer files from a given directory to
different directory, rename the file.
 cp – copy files from one location to another
 cp –r -to copy directories
 ^ A – goes to start of line
 ^ E – goes to end of line

PESG | Product Enablement Solutions Group Intel Confidential 5


 touch – create new file without content inside it.
 cat - display contents of a file,
appends contents of one file to end of another file,
create a file,
copy one file to another
 > - redirects standard output to overwrite existing file
 tac –used to concatenate and displays values in reverse
 more – view file content one screen at a time
 less - view file contents one screen at time but faster than more
 echo – displays line of text/string passed as argument
 head – display first 10 lines of a file
 tail – displays last 10 lines of a line
PESG | Product Enablement Solutions Group Intel Confidential 6
 setenv - command can be used to define an environment variable and
assign a value to it.
 env - print a list of environment variables or run another utility in an altered
environment without having to modify the currently existing environment.
 | (pipe) - lets you use two or more commands such that output of one
command serves as input to the next.
 sort – arranges the file in a particular order
 grep - used to search for a string of characters in a specified file.
 man - used to display the user manual of any command that we can run on
the terminal
 apropos -helps when the exact command is not known
 q – quit the process

PESG | Product Enablement Solutions Group Intel Confidential 7


 cal – displays calender
 clear – clears the command line
 history – gives list of previous commands
 wc – gives the count of characters,words & lines in a file
 bc - basic calculator
 bg – runs jobs in background
 dir –lists contents of a directory
 expr –evaluates expression and displays output
 gzip - compress a file
 gunzip – uncompress a file
 tar – compress a file
 sed – to edit files such as to replace words

PESG | Product Enablement Solutions Group Intel Confidential 8


 whereis – to locate the file
 kill%% – terminates the process
 ln –s <file> link – creates symbolic link to file
 !! – returns history of commands
 who – display list of users currently logged in
 whatis - gives one line manual description of a command
 whereis – finds location of a file
 find – to search for files/folders
 uniq – prints number of repeated lines

PESG | Product Enablement Solutions Group Intel Confidential 9


 meld – for comparison of files/folders
 tkdiff – for comparison of files
 xrandr - used to set the size, orientation and/or reflection of the
outputs for a screen
 xwashmgr – displays groups in GUI
 wash – remove group restart the session
 groups – lists the groups access
 source – execute file in shell
 pushd – adds directory to the top of the stack
 popd – removes directories from directory stack
 dirs - used to display the list of currently remembered directories

PESG | Product Enablement Solutions Group Intel Confidential 10


 df – shows available disk space
 id –gives user and group id
 whoami – gives the user id
 top – prints system usage
 ps - list the currently running processes and their PIDs
 du – shows directory usage space
 uptime – to find how long the system is running
 file -recognizing the type of data contained in a computer file.
 stat - displays the detailed status of a particular file or a file system.

PESG | Product Enablement Solutions Group Intel Confidential 11


GIT COMMANDS
 git clone – clone the ip
clone ip : dteg_clone –list <ip_name/keyword>
 git add – add file contents to index
 git mv – move or rename a file
 git rm – remove files from working tree and index
 git commit – record changes to repo
 git pull –fetch from and integrate with another repo
 git push - Update remote refs along with associated objects
 git status –displays status of working directory and staging area
 gitk – opens a graphical history viewer
PESG | Product Enablement Solutions Group Intel Confidential 12
GVIM COMMANDS
 Insert mode – i
 Normal mode – esc
 :w – save a file
 :wq! – save and quit forcefully
 :q – quit a file
 :qa! – quit all files
 : e – edit
 : e + tab – list the files that can be edited
 :e . - lists files in current directory that can be edited

PESG | Product Enablement Solutions Group Intel Confidential 13


 h – navigate to left
 l – navigate to right
 h – navigate upwards
 j – navigate downwards
 w – jumb by words
 e – jump to end of words
 ( - jumps to next sentence
 ) – jumps back to prev sentence
 { - jumps to next paragraph
 } – jumps to prev paragraph

PESG | Product Enablement Solutions Group Intel Confidential 14


 /search pattern –search for a pattern
 / ab..c – search for pattern when correct spelling is not known
 ? – search backwards
 n – navigates forward
 Shift +n – navigates backwards
 gg - goes to beginning of file
 Shift +g – goes to end of fine
 ^f – moves forward by a page
 ^b – moves backward by a page
 0 – goes to beginning of a line
 $ - goes to end of a line

PESG | Product Enablement Solutions Group Intel Confidential 15


 u - undo
 ^r or red - redo
 * - navigates forward
 # - navigates backward
 dw – delete word
 dd – delete line
 x – delete character
 d +word – delete the particular word
 yw – copy word
 yy – copy line
 p – paste after cursor
 noh – removes highlight
PESG | Product Enablement Solutions Group Intel Confidential 16
 cc- change/replace an entire line
 cw – change/replace a word
 s – delete character at cursor and replace text
 S – delete line at cursor and substitute text
 Shift +v – enters visual line
 Cntrl +v – enters visual block
 :%s/ old /new /g – replace all old with new throughout the file
 :sp - horizontal split
 :vsp – vertical split
 :bd – delete buffer
 :ctrl + ww – switch between windows
PESG | Product Enablement Solutions Group Intel Confidential 17
 : 1r filename – inserts file before the contents of
current file
 :se nu – to set number
 :se nonu – to remove numbers
 :noremap <new> <old> - use new command
instead of existing one
 :abb short long– shortform autocompletes for
longform
 :! – executes external commands inside gvim
 :diffsp f1 f2 – horizontally split files and compares
 :diffvsp f1 f2 – vertically splits files and compares

PESG | Product Enablement Solutions Group Intel Confidential 18


 :gvim –p *.extension – opens all files with the extension
in diff tabs
 gf – goes to the specified input file
 ^6 – comes back to original file
 :tabe - open file in a new tab
 cntrl v (enters visual mode) + select lines + shift i
(insert mode) + enter text +esc - Adding same text to
multiple lines in a file
 ctrl+v(visual mode) + shift : + s/old word/new word/gc -
Replace text in a file

PESG | Product Enablement Solutions Group Intel Confidential 19


THANK YOU

PESG | Product Enablement Solutions Group Intel Confidential 20


21

You might also like