Linux_UNIX_info

Linux_UNIX_info - Linux/Unix Information Leonard Wesley San...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Linux/Unix Information Leonard Wesley San Jose State Computer Engineering Dept. CmpE126: Data Structures and Algorithm Design Logging In To The CmpE126 Linux Lab This section to be completed when student accounts are created. Using the man pages man command ; find command, C function or system file man –s 2 command ; find command, etc. in section 2 section 1 – Unix shell commands; user commands section 2 – Unix shell commands; system commands section 3 – C library functions section 4 – File formats section 5 – Standards, environments & macros Opening a Command Window Just SSH in as many times as you want windows, if you are logging remotely.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Creating and Changing Directories; Listing, Copying & Moving Files create a new directory mkdir directory-name go to some other directory cd directory-name go to home directory $HOME cd go to home directory (~ is shorthand for $HOME) cd ~ removing a directory (directory must be empty) rmdir directory-name removing a directory or file rm file-name rm –r directory-name removing all files in the current directory rm * removing all directory trees in the current directory rm –rf * what’s in directory dir? ls directory-name what’s in the current directory? ls ls –l change a file name, or move it somewhere else; also directories mv oldname newname copy a file cp file filecopy copy a batch of files to some directory cp files directory The vi Editor The vi editor uses the typewriter keys on the keyboard and the arrow keys ONLY o NOT the mouse o NOT the F1, F2, . .. control keys o NOT the Insert/Delete/Home/End/Pageup/PageDown keypad o The numeric keypad is OK if in NUMLOCK mode There are NO scroll bars, but you can use the mouse to increase the window size vi behaves exactly the same way through a secure shell network connection. open an existing file like this: vi filename vi is always in one of two modes – o control mode, in which keys cause some operation, or o insertion mode, in which keys insert text switch to control mode with ESC – the escape key switch to insertion mode with either of a, i, o, p keys
Background image of page 2
Operation Keys – in control mode move the cursor arrow keys h move left j move down k move right l move up ctl-f move one screen down ctl-b move one screen up $ last position of current line
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Linux_UNIX_info - Linux/Unix Information Leonard Wesley San...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online