UNIX/LINUX REFERENCE CARD Basic File and Directory Manipulation File Viewing File Text Manipulation File Properties File And

Total Page:16

File Type:pdf, Size:1020Kb

UNIX/LINUX REFERENCE CARD Basic File and Directory Manipulation File Viewing File Text Manipulation File Properties File And UNIX/LINUX REFERENCE CARD File and Commands Location and Help Scheduling Jobs find ...................................... Locate files sleep ......................... Delay for specified time locate .......................... Locate files via index watch...................Run programs at set intervals Basic File and Directory Manipulation which .............................. Locate commands at ..................................... Schedule a job ls ............................. List directory contents apropos.........Locate commands by keyword lookup cron ................................... Clock daemon cp .......................................... Copy files man ................. Find and display online help page crontab ............... Schedule repeated jobs for cron mv..................................Move/rename files whereis ... Locate bin, src and man files for command expect....Automates tasks using interactive programs rm ....................................... Remove files shred ............................ Destroy data in files ln...........................................Link files File Compression Printing cd...................................Change directory gzip ............... Compress/decompress files (LZ77) lpr ......................................... Print files pwd ................... Print present working directory bzip2..............Compress/decompress files (BWT) lpq ................................. View print queue mkdir ................................. Make directory [un]zip ..... (De-)Compress files (PKZIP compatible) lprm ............................... Remove print jobs rmdir ............................... Remove directory File Comparison and Patching Processes File Viewing diff ........................ Compare files line by line ps ................................... List all processes cat .............. Concatenate files and print to stdout patch ................... Apply changes from a diff file w ................................. List users’ processes more ............................... Page through files comm ............................. Compare sorted files uptime ........................... View system uptime less ............................... Page through files cmp ........................ Compare files byte by byte top.................................Monitor processes nl ............................... Number lines of files md5sum.......Compute and check MD5 message digest xload ............................ Monitor system load od ............... Prints file in octal and other formats kill ............................. Terminate processes nice ............... Run process with modified priority Disks and Filesystems renice ................. Alter running process’ priority File Text Manipulation df ............................... Show free disk space grep ................ Search text for matching patterns mount .......................... Make a disk accessible cut.............Remove sections from each line of files fcsk ........................... Check a disk for errors Hosts paste .............................. Merge lines of files sync .......... Synchronizes filesystem buffers and disk uname ....................... Print system information tr ...................... Translate or delete characters quota ............... Check disk quota for current user hostname ................ Print the system’s hostname join .............. Join lines of files on a common field ifconfig.............Set/display network information split.............................Split file into pieces host....................................Look up DNS csplit ......... Split file into sections by context lines Backups and Remote Storage whois ..................... Look up domain registrants sort ........................................ Sort lines mt................................Control a tape drive ping ... Check reachability and response time of a host uniq ........... Remove duplicate lines from sorted file dump...................................Back up a disk traceroute .............. View network path to a host fmt ..................... Simple optimal text formatter restore .............................. Restore a dump tar ............ Read/write (compressed) tape archives rsync ............................. Mirror a set of files File Editing File Properties dar .................................... Archive a disk vim ....................................... Text editor stat................................Display file status gvim......................Forks a GUI version of ViM wc ........................... Count bytes/words/lines emacs ..................................... Text editor du ................................ Estimate disk usage Environment sed...........................GNU stream text editor file ........................ Manipulate file attributes env ..................... Display environment variables touch ......................... Change file timestamps echo....................................Print variable chown .............................. Change file owner export............Write environment variables (Bash) Spelling Operations chgrp...............................Change file group set .... Write environment variables with more options ispell .................... Check spelling interactively chmod ......................... Change file protections unset .................... Unset environment variables look ................................. Look up spelling Networking Development ssh.....................Securely log into remote hosts cscope ............ Interactively examine a C program scp .................. Securely copy files between hosts gcc........................Compiles C and C++ code sftp ................. Securely copy files between hosts gdb ......................... Debugger for C and C++ wget ............................ Retrieve a url to disk javac.............................Compiles Java code curl ............................ Retrieve a url to disk jdb ................................ Debugger for Java gaim................................Instant messaging awk ......... Pattern scanning and processing language talk ................................ Linux/Unix Chat perl ...................... Perl programming language write .................... Send messages to a terminal python ................ Python programming language mesg.......................Enable/prohibit talk/write ruby.....................Ruby programming language finger ............... Display information about users matlab ................. Technical computing language who.............................Show who is logged in mathematica ....... Mathematical computing language last ............ Displays login and logout information R .............................. Data analysis language Email, News and Web Browsing Encryption pine ......... Terminal-based email and news program pgp .................... Public key encryption program mutt ................... Terminal-based email program gpg..............GnuPG: an encryption tool like PGP mail .............................. Minimal mail client ..........................Text-only web browser links Terminal Emulators firefox ............................ GUI web browser xterm...............Standard terminal emulator for X rxvt ............. Lightweight terminal emulator for X Text Processors and Viewers mrxvt ............... Multi-tab enabled version of rxvt latex ................... Compiles LaTeX → TeX DVI pdflatex....................Compiles LaTeX → PDF Miscellaneous bibtex.........................Compiles BiBTeX files alias ........ Create shorthand for a series commands gv..........................View Postscript/PDF files su ........... Allows you to run a shell as another user xdvi .............................. View TeX DVI files sudo ..... Lets you execute a command as another user dvips...................Prints/converts TeX DVI files nohup............Lets a program run after you log out ps2pdf ................... Converts Postscript → PDF antiword................Converts MS Word → ASCII Image Manipulation/Display xv ................................. Image viewer for X qiv ................ Fast gdk/imlib image viewer for X feh .................... Fast imlib2 image viewer for X display..................ImageMagick: display image convert ................. ImageMagick: convert image This card may be freely distributed under the terms of the GNU identify ........ ImageMagick: display file image info general public licence — This document was compiled by Thiam import....ImageMagick: save screen/window as image H Lee on h2006-12-06i — v0.6 — The author assumes no re- compare ............... ImageMagick: compare images sponsibility for any errors on this card. The latest version can xfig..........................Tool for drawing figures be found at http://www.columbia.edu/~thl2102/. This reference transfig ....... Converts fig → portable LaTeX figure card was adapted from Laurent Gr´egoire’s ViM Quick Reference gimp ............... GNU image manipulation program Card, found at http://tnerual.eriogerg.free.fr/vim.html ..
Recommended publications
  • Towards Web-Based Delta Synchronization for Cloud Storage Services
    Towards Web-based Delta Synchronization for Cloud Storage Services He Xiao Zhenhua Li ∗ Ennan Zhai Tianyin Xu Tsinghua University Tsinghua University Yale University UIUC Yang Li Yunhao Liu Quanlu Zhang Yao Liu Tsinghua University Tsinghua University Microsoft Research SUNY Binghamton Abstract savings in the presence of users’ file edits [29, 39, 40]. Delta synchronization (sync) is crucial for network-level Unfortunately, today delta sync is only available for efficiency of cloud storage services. Practical delta sync PC clients and mobile apps, but not for the web—the most pervasive and OS-independent access method [37]. techniques are, however, only available for PC clients 0 and mobile apps, but not web browsers—the most per- After a file f is edited into a new version f by users, vasive and OS-independent access method. To under- Dropbox’s PC client will apply delta sync to automati- stand the obstacles of web-based delta sync, we imple- cally upload only the altered bits to the cloud; in contrast, Dropbox’s web interface requires users to manually up- ment a delta sync solution, WebRsync, using state-of- 0 1 the-art web techniques based on rsync, the de facto delta load the entire content of f to the cloud. This gap sig- sync protocol for PC clients. Our measurements show nificantly affects web-based user experiences in terms of that WebRsync severely suffers from the inefficiency of both sync speed and traffic cost. JavaScript execution inside web browsers, thus leading Web is a fairly popular access method for cloud stor- to frequent stagnation and even hanging.
    [Show full text]
  • The Linux Kernel Module Programming Guide
    The Linux Kernel Module Programming Guide Peter Jay Salzman Michael Burian Ori Pomerantz Copyright © 2001 Peter Jay Salzman 2007−05−18 ver 2.6.4 The Linux Kernel Module Programming Guide is a free book; you may reproduce and/or modify it under the terms of the Open Software License, version 1.1. You can obtain a copy of this license at http://opensource.org/licenses/osl.php. This book is distributed in the hope it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. The author encourages wide distribution of this book for personal or commercial use, provided the above copyright notice remains intact and the method adheres to the provisions of the Open Software License. In summary, you may copy and distribute this book free of charge or for a profit. No explicit permission is required from the author for reproduction of this book in any medium, physical or electronic. Derivative works and translations of this document must be placed under the Open Software License, and the original copyright notice must remain intact. If you have contributed new material to this book, you must make the material and source code available for your revisions. Please make revisions and updates available directly to the document maintainer, Peter Jay Salzman <[email protected]>. This will allow for the merging of updates and provide consistent revisions to the Linux community. If you publish or distribute this book commercially, donations, royalties, and/or printed copies are greatly appreciated by the author and the Linux Documentation Project (LDP).
    [Show full text]
  • Linux on the Road
    Linux on the Road Linux with Laptops, Notebooks, PDAs, Mobile Phones and Other Portable Devices Werner Heuser <wehe[AT]tuxmobil.org> Linux Mobile Edition Edition Version 3.22 TuxMobil Berlin Copyright © 2000-2011 Werner Heuser 2011-12-12 Revision History Revision 3.22 2011-12-12 Revised by: wh The address of the opensuse-mobile mailing list has been added, a section power management for graphics cards has been added, a short description of Intel's LinuxPowerTop project has been added, all references to Suspend2 have been changed to TuxOnIce, links to OpenSync and Funambol syncronization packages have been added, some notes about SSDs have been added, many URLs have been checked and some minor improvements have been made. Revision 3.21 2005-11-14 Revised by: wh Some more typos have been fixed. Revision 3.20 2005-11-14 Revised by: wh Some typos have been fixed. Revision 3.19 2005-11-14 Revised by: wh A link to keytouch has been added, minor changes have been made. Revision 3.18 2005-10-10 Revised by: wh Some URLs have been updated, spelling has been corrected, minor changes have been made. Revision 3.17.1 2005-09-28 Revised by: sh A technical and a language review have been performed by Sebastian Henschel. Numerous bugs have been fixed and many URLs have been updated. Revision 3.17 2005-08-28 Revised by: wh Some more tools added to external monitor/projector section, link to Zaurus Development with Damn Small Linux added to cross-compile section, some additions about acoustic management for hard disks added, references to X.org added to X11 sections, link to laptop-mode-tools added, some URLs updated, spelling cleaned, minor changes.
    [Show full text]
  • Motor Vehicle Division Prestige License Plate Application
    For State or County use only: Denied Refund Form MV-9B (Rev. 08-2017) Web and MV Manual Georgia Department of Revenue - Motor Vehicle Division Prestige License Plate Application ______________________________________________________________________________________ Purpose of this Form: This form is to be used by a vehicle owner to request the manufacture of a Special Prestige (Personalized) License Plate. This form should not be used to record a change of ownership, change of address, or change of license plate classification. How to submit this form: After reviewing the MV-9B form instructions, this fully completed form must be submitted to your local County tag office. Please refer to our website at https://mvd.dor.ga.gov/motor/tagoffices/SelectTagOffice.aspx to locate the address(es) for your specific County. OWNER INFORMATION First Name Middle Initial Last Name Suffix Owners’ Full Legal Name: Mailing Address: City: State: Zip: Telephone Number: Owner(s)’ Full Legal Name: First Name Middle Initial Last Name Suffix If secondary Owner(s) are listed Mailing Address: City: State: Zip: Telephone Number: VEHICLE INFORMATION Vehicle Identification Number (VIN): Year: Make: Model: LICENSE PLATE COMBINATION Private Passenger Vehicle (Includes Motor Home and Non-Commercial Trailer) Note: Private passenger vehicles cannot exceed seven (7) letters and/or numbers including spaces. Meaning: ___________________________ Meaning: ___________________________ Meaning: ___________________________ (Required) (Required) (Required) Motorcycle Note: Motorcycles cannot exceed six (6) letters and/or numbers including spaces. Meaning: ___________________________ Meaning: ___________________________ Meaning: ___________________________ (Required) (Required) (Required) Note: No punctuation or symbols are allowed on a license plate. Only letters, numbers, and spaces are allowed. I request that a personal prestige license plate be manufactured.
    [Show full text]
  • Beyond Compare User Guide
    Copyright © 2012 Scooter Software, Inc. Beyond Compare Copyright © 2012 Scooter Software, Inc. All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: July 2012 Contents 3 Table of Contents Part 1 Welcome 7 1 What's. .N..e..w............................................................................................................................. 8 2 Standa..r.d.. .v..s. .P..r..o..................................................................................................................... 9 Part 2 Using Beyond Compare 11 1 Home. .V...i.e..w..........................................................................................................................
    [Show full text]
  • Cygwin User's Guide
    Cygwin User’s Guide Cygwin User’s Guide ii Copyright © Cygwin authors Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .4 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select . .7 1.7 What’s new and what changed in Cygwin . .7 1.7.1 What’s new and what changed in 3.2 .
    [Show full text]
  • 101 Useful Linux Commands - Haydenjames.Io
    101 Useful Linux Commands - haydenjames.io Some of these commands require elevated permissions (sudo) to run. Enjoy! 1. Execute the previous command used: !! 2. Execute a previous command starting with a specific letter. Example: !s 3. Short way to copy or backup a file before you edit it. For example, copy nginx.conf cp nginx.conf{,.bak} 4. Toggle between current directory and last directory cd - 5. Move to parent (higher level) directory. Note the space! cd .. 6. Go to home directory cd ~ 7. Go to home directory cd $HOME 8. Go to home directory (when used alone) cd 9. Set permissions to 755. Corresponds to these permissions: (-rwx-r-x-r-x), arranged in this sequence: (owner-group-other) chmod 755 <filename> 10. Add execute permission to all users. chmod a+x <filename> 11. Changes ownership of a file or directory to . chown <username> 12. Make a backup copy of a file (named file.backup) cp <file> <file>.backup 13. Copy file1, use it to create file2 cp <file1> <file2> 14. Copy directory1 and all its contents (recursively) into directory2 cp -r <directory1> <directory2>/ 15. Display date date 16. Zero the sdb drive. You may want to use GParted to format the drive afterward. You need elevated permissions to run this (sudo). dd if=/dev/zero of=/dev/sdb 17. Display disk space usage df -h 18. Take detailed messages from OS and input to text file dmesg>dmesg.txt 19. Display a LOT of system information. I usually pipe output to less. You need elevated permissions to run this (sudo).
    [Show full text]
  • Software to Compare Source Code
    Software to compare source code WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that WinMerge is an open source project, which means that the program is ​Download WinMerge · ​Screenshots · ​About · ​Documentation. Diff Checker is an online diff tool to compare text to find the difference between two text files.​PDF diff · ​Images · ​Sign up · ​Login. This is one of the reasons why many software developers use this source code compare tool. If you need a standalone of CodeCompare you. ExamDiff is a freeware Windows tool to visually compare text files. Version Control System that allows joint software development remotely over the Internet. Download Notepad++ Compare plugin for free. map of compared files; Moved line detection; Easy navigation between . Other Useful Business Software . Get latest updates about Open Source Projects, Conferences and. Devart Software. |. clicks. | () Code Compare is a powerful tool for file and folder comparison and merging. Code Compare is an Moved blocks of code are detected if source code is reordered in files. Difference. Buggy source codes will be a nagging problem throughout a developer's career In looking for software tools to use for code comparisons, you'll run into a lot of. Fast downloads of the latest free software! Code Compare can be integrated with all popular source control systems: TFS, SVN, Git, Mercurial. This article compares computer software tools that compare files, and in many cases directories .. WinDiff, No, No, No, No. WinMerge, Yes, No, Mercurial, Subversion, Visual Source Safe, Rational ClearCase, Yes, Yes.
    [Show full text]
  • Fira Code: Monospaced Font with Programming Ligatures
    Personal Open source Business Explore Pricing Blog Support This repository Sign in Sign up tonsky / FiraCode Watch 282 Star 9,014 Fork 255 Code Issues 74 Pull requests 1 Projects 0 Wiki Pulse Graphs Monospaced font with programming ligatures 145 commits 1 branch 15 releases 32 contributors OFL-1.1 master New pull request Find file Clone or download lf- committed with tonsky Add mintty to the ligatures-unsupported list (#284) Latest commit d7dbc2d 16 days ago distr Version 1.203 (added `__`, closes #120) a month ago showcases Version 1.203 (added `__`, closes #120) a month ago .gitignore - Removed `!!!` `???` `;;;` `&&&` `|||` `=~` (closes #167) `~~~` `%%%` 3 months ago FiraCode.glyphs Version 1.203 (added `__`, closes #120) a month ago LICENSE version 0.6 a year ago README.md Add mintty to the ligatures-unsupported list (#284) 16 days ago gen_calt.clj Removed `/**` `**/` and disabled ligatures for `/*/` `*/*` sequences … 2 months ago release.sh removed Retina weight from webfonts 3 months ago README.md Fira Code: monospaced font with programming ligatures Problem Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like -> , <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet. Solution Download v1.203 · How to install · News & updates Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations.
    [Show full text]
  • Unix/Linux Command Reference
    Unix/Linux Command Reference .com File Commands System Info ls – directory listing date – show the current date and time ls -al – formatted listing with hidden files cal – show this month's calendar cd dir - change directory to dir uptime – show current uptime cd – change to home w – display who is online pwd – show current directory whoami – who you are logged in as mkdir dir – create a directory dir finger user – display information about user rm file – delete file uname -a – show kernel information rm -r dir – delete directory dir cat /proc/cpuinfo – cpu information rm -f file – force remove file cat /proc/meminfo – memory information rm -rf dir – force remove directory dir * man command – show the manual for command cp file1 file2 – copy file1 to file2 df – show disk usage cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it du – show directory space usage doesn't exist free – show memory and swap usage mv file1 file2 – rename or move file1 to file2 whereis app – show possible locations of app if file2 is an existing directory, moves file1 into which app – show which app will be run by default directory file2 ln -s file link – create symbolic link link to file Compression touch file – create or update file tar cf file.tar files – create a tar named cat > file – places standard input into file file.tar containing files more file – output the contents of file tar xf file.tar – extract the files from file.tar head file – output the first 10 lines of file tar czf file.tar.gz files – create a tar with tail file – output the last 10 lines
    [Show full text]
  • Using Text Animated Transitions to Support Navigation in Document Histories
    Using Text Animated Transitions to Support Navigation in Document Histories Fanny Chevalier Pierre Dragicevic Anastasia Bezerianos Jean-Daniel Fekete Microsoft-INRIA INRIA Ecole´ Centrale Paris INRIA [email protected] [email protected] [email protected] [email protected] Figure 1. Detail of an animated transition between two revisions of the Wikipedia article User interfaces. ABSTRACT others [20]. Supporting change awareness is not only es- This article examines the benefits of using text animated sential for writing articles, but also for programming code transitions for navigating in the revision history of textual where changes can profoundly impact the quality of a pro- documents. We propose an animation technique for smoothly gram. Millions of people, such as programmers, researchers transitioning between different text revisions, then present or Wikipedia contributors, now rely on revision control sys- the Diffamation system. Diffamation supports rapid explo- tems [22] to perform their computer-based daily activity. ration of revision histories by combining text animated tran- sitions with simple navigation and visualization tools. We While the problem of storing and retrieving revisions has finally describe a user study showing that smooth text anima- been mostly solved from the technical standpoint [22], cur- tion allows users to track changes in the evolution of textual rent revision management systems only support two tasks: documents more effectively than flipping pages. retrieving a specified revision (by number, date, name etc.) and comparing two revisions by computing “diffs”. But with ACM Classification Keywords the popularity of sites where anyone can edit articles, users H.5.1 Multimedia Information Systems: [animations]; H.5.2 are often interested in more complex tasks, such as under- User Interfaces: [Graphical user interfaces (GUI)] standing the edition history of an article or keeping track of General Terms specific portions of an article they are contributing to.
    [Show full text]
  • What Is UNIX? the Directory Structure Basic Commands Find
    What is UNIX? UNIX is an operating system like Windows on our computers. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. The Directory Structure All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / ) Basic commands When you first login, your current working directory is your home directory. In UNIX (.) means the current directory and (..) means the parent of the current directory. find command The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria. The syntax looks like this: find where-to-look criteria what-to-do All arguments to find are optional, and there are defaults for all parts. where-to-look defaults to . (that is, the current working directory), criteria defaults to none (that is, select all files), and what-to-do (known as the find action) defaults to ‑print (that is, display the names of found files to standard output). Examples: find . –name *.txt (finds all the files ending with txt in current directory and subdirectories) find . -mtime 1 (find all the files modified exact 1 day) find . -mtime -1 (find all the files modified less than 1 day) find . -mtime +1 (find all the files modified more than 1 day) find .
    [Show full text]