1 / 7

UNIX Commands

UNIX Commands. CIS 218 Advanced UNIX. Commands (UNIX). File/Directory information ls LiSt. Shows contents of current directory. cd Change Directory mv MoVe. Moves a file (leaves no copy).

talisa
Télécharger la présentation

UNIX Commands

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIX Commands CIS 218 Advanced UNIX

  2. Commands (UNIX) • File/Directory information ls LiSt. Shows contents of current directory. cd Change Directory mv MoVe. Moves a file (leaves no copy). cp CoPy. Like mv, but leaves a copy. mkdir MaKe DIRectory rm ReMove. Delete, cannot be undeleted. rmdir ReMove Directory pwd Print Working Directory chmod Change permissions. du Disk Use. Shows totals in kilobytes.

  3. Commands (UNIX) • System Information w Who. Lists users, login times, and status. who Lists users, and login sites. finger Shows personal information. date Shows current date and time. uptime Shows system status, and load averages. man MANual pages. Complete online reference. ps ProceSses. Show programs are being run. top Shows top users of CPU and RAM (see also ps -aux and vmstat) df Display filesystem information uname Display UNIX information vmstat virtual memory statistics

  4. Commands (UNIX) • Task Management nohup Process runs after logging out (stdout to nohup.out) ^C Standard interrupt ^D End of Text (EOT) ^Z Stop current program fg ForeGround (resume) a program bg BackGround (resume at low priority) a program kill Terminate a stopped program jobs List all running or stopped programs. & Run in background (append at program start).

  5. Commands (UNIX) • File Manipulation cat displays file text on STDOUT cut displays designated fields/characters echo displays string on STDOUT expand converts tabs to spaces file display info about a file find Locate file by name (find fmt simple text formatter fuser File user grep displays that match a pattern head displays designated number of lines from top of file less display text a page at a time ls list file info lsof list open files more display text a page at a time nl numbers lines od displays octal, decimal, hex dump of file paste merges lines from two files sort sorts lines in a file stat Display file inode info (metadata). See also ls –I, find –inum. strings displays text strings in a binary file tac displays text in reverse order tail displays designated number of lines from bottom of file touch update file timestamp info, create file if it doesn’t exist tr translate utility unexpand converts spaces to tabs uniq displays unique sequential occurences of lines uuencode, uudecode See also base 64 command wc counts characters, words, and lines

  6. Commands (UNIX) • Redirection > Redirect output to a file >> Append output to a file 2> Redirect errors to a file < Send file as input << HERE" redirection in a script | “Pipe" – STDOUT of one command to STDIN of next command

  7. Commands (UNIX) • Other clear Clears the screen lpr Print lpq Check print queue lpstat Check print statistics rlogin Remote login rsh Remote Shell tar Tape ARchive. gzip Compress/Decompress files (.gz extension) compress Compress/Decompress files (.Z extension) gcc C compiler

More Related