[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-573161-105":3,"detail-sidebar-cat-1-en-105":80,"doc-detail-573161-en":126},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","unix-command-cheat-sheet-quick-reference-for-common-commands","UNIX Command Cheat Sheet - quick reference for common commands","","UNIX Command Cheat Sheet provides a concise reference for navigating directories, listing and viewing files, searching text, and managing environment variables. It covers core shell utilities and common editor names, plus practical examples for changing permissions, redirecting input/output, and using pipes. The sheet also includes job and process management commands, including foreground/background control, remote connection tools like SSH/SCP/Wget, and useful miscellaneous commands such as man, tar, du, df, and history.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/unix-command-cheat-sheet-quick-reference-for-common-commands/573161/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/unix-command-cheat-sheet-quick-reference-for-common-commands/573161.png","ImageObject",442,249,{"name":42,"@type":43},"Muffet","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-18","2026-10-13",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"How do you list files and move between directories in UNIX?","Question",{"text":62,"@type":63},"Use ls to list directory contents and cd to change directories. You can navigate using ., .., ~ for the home directory, and - for the previous directory.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"Which commands help search within files and locate files on disk?",{"text":67,"@type":63},"Use grep to search for words in files. Use find to search a path for files or directories matching specific criteria, such as by name or type.",{"name":69,"@type":60,"acceptedAnswer":70},"How can you manage processes and work in the background?",{"text":71,"@type":63},"Run jobs in the background with &, inspect with jobs, and view processes with ps or top. Use Ctrl-c to cancel and Ctrl-z to pause, then resume with bg or bring back with fg.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},573161,1792015751,{"code":4,"msg":81,"data":82},"success",[83,87,92,97,102,107,112,117,122],{"id":84,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":85,"slug":86},11,90,"presentations",{"id":88,"doc_module":22,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},12,"Resumes",80,"resumes",{"id":93,"doc_module":22,"doc_module_name":25,"category_name":94,"show_sort_weight":95,"slug":96},14,"Invoices",70,"invoices",{"id":98,"doc_module":22,"doc_module_name":25,"category_name":99,"show_sort_weight":100,"slug":101},15,"Posters",60,"posters",{"id":103,"doc_module":22,"doc_module_name":25,"category_name":104,"show_sort_weight":105,"slug":106},16,"Social Media",50,"social-media",{"id":108,"doc_module":22,"doc_module_name":25,"category_name":109,"show_sort_weight":110,"slug":111},17,"Forms",40,"forms",{"id":113,"doc_module":22,"doc_module_name":25,"category_name":114,"show_sort_weight":115,"slug":116},18,"Letters",30,"letters",{"id":118,"doc_module":22,"doc_module_name":25,"category_name":119,"show_sort_weight":120,"slug":121},21,"Paper Templates",5,"papers-templates",{"id":123,"doc_module":22,"doc_module_name":25,"category_name":124,"show_sort_weight":4,"slug":125},158,"General","general-158",{"code":4,"msg":81,"data":127},{"doc_id":78,"user_id":128,"nickname":42,"user_avatar":129,"doc_module":22,"category_id":84,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":26,"language":135,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":12,"update_tm":139,"read_time":22},962090768927,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","UNIX Command Cheat Sheet Carnegie Observatories Summer Research Program Every command and ﬁlename is CaSe sEnSiTiVe!  \n\n| Command | Description | Examples and Options |\n| --- | --- | --- |\n| \u003Ctab> | Attempt to autocomplete | Use this to speed up typing/avoid typos |\n| Navigating Directories |  |  |\n| ls | List the contents of the directory. | ls -larth /home/mcuser/science/code |\n| cd | Change directory. | cd /home/mcuser/science |\n| pwd | present working directory. | pwd |\n| * | Wild card, any number of chars. | ls * . txt |\n| ? | Wild card, 0 or 1 characters. | ls foo? . txt |\n| . | Current directory. | cd . |\n| .. | Directory one level up. | cd   |\n| ~ | Home directory. | cd ~ |\n| - | Previous directory. | cd - |\n| Modifying Directories and Files |  |  |\n| mkdir | Make new empty directory. | mkdir MyNewDirectory |\n| rmdir | Remove empty directory. | rmdir MyNewDirectory |\n| mv | Move ﬁles (overwrites destination) . | mv -i foo . txt foo2 . txt |\n| cp | Copy ﬁles (overwrites destination) . | cp -i . ./foo . txt . |\n| rm | Remove ﬁles. CANNOT UNDO! | rm -i foo . txt |\n| chmod | Change ﬁle permissions.\u003Cbr>rwx = read, write, execute. ugoa = user, group, other, all. | chmod a+rwx badger. txt\u003Cbr>chmod o-wx badger. txt\u003Cbr>chmod u+x [myscript. sh](myscript. sh) |\n| Viewing Files in Terminal |  |  |\n| less | View ﬁles in terminal window. | less foo . txt |\n| cat | Concatenate ﬁles. | cat foo1 . txt foo2 . txt |\n| head | Display ﬁrst 10 lines. | head -20 foo . txt |\n| tail | Display last 10 lines. | tail -f logfile . txt |\n| Searching |  |  |\n| grep | Search for word(s) in a ﬁle. | grep myvarname * . txt\u003Cbr>grep rodent * . txt\u003Cbr>grep \"Hello World\" * . txt |\n| find | Search a path for ﬁles/directories that match some speciﬁcation. | find playground -name \"* . txt\"find playground -type d\u003Cbr>find playground -not -name \"* . txt\" |\n| Environment Variables |  |  |\n| $HOME | Home directory. | workpath=$HOME/playground |\n| $SHELL | Shell name. | echo $SHELL |\n| $USER | User name. | echo $USER |\n| $PATH | Paths to look in for executables. | PATH=${PATH}:/my/new/program/path/bin |\n| env | List environment vars and values. | env | less |\n\nCommon text editors: emacs, vim, vi, pico, nano  \n\n| Command | Description | Examples and Options |\n| --- | --- | --- |\n| File Manipulation |  |  |\n| wc | Word count. | wc -l [mycode. py](mycode. py) |\n| sort | Sort input alphanumerically. |  |\n| | | Pipe/ﬁlter output through another program. | cat foo . txt | less\u003Cbr>sort myfile. txt | grep mykeyword |\n| > | Redirect standard output to. Overwrites existing ﬁle. | cat foo . txt > foo2 . txt |\n| >> | Redirect standard output and concatenate to. | cat foo . txt >> foo2 . txt |\n| \u003C | Redirect standard input from. | less \u003C foo . txt |\n| awk | Advanced operations by column. |  |\n| sed | Advanced operations by row. |  |\n| Job/process Manipulation |  |  |\n| & | Run process in background. | ./[run_job. sh &](run_job. sh &) |\n| jobs | Show your current processes | jobs |\n| ps | Show processes (more ﬂexible) | ps -u username |\n| top | Show top active processes | top -u username |\n| kill | Stop a job | kill processid |\n| Ctrl-z | Pause current job | ./[run_job. sh](run_job. sh) ; Ctrl-z |\n| Ctrl-c | Cancel current job | ./[run_job. sh](run_job. sh) ; Ctrl-c |\n| bg | Resume process in background | ./[run_job. sh](run_job. sh) ; Ctrl-z; bg %1 |\n| fg | Bring process to foreground | fg %2 |\n| Remote Connections |  |  |\n| ssh | Secure shell login. | ssh -Y [user@host. edu](user@host. edu) |\n| scp | Secure copy. | scp [user@host. edu: path/to/file. txt](user@host. edu: path/to/file. txt) . |\n| wget | Download ﬁle from remote URL. | wget [www. google. com -O](www. google. com -O) google. html |\n| Ctrl-d | Exit login. Sometimes disabled. | Can also use exit, logout |\n| Miscellaneous |  |  |\n| man | Manual for other commands. | man cat |\n| sleep | Do nothing | sleep 30 |\n| touch | Create empty ﬁle/update timestamp | touch newfile . txt |\n| whoami | Print current user. | whoami |","cbCaibKA2o3YpGiw","https://ap.wps.com/l/cbCaibKA2o3YpGiw","pdf",147922,"English","# Navigating Directories\n## Modifying Directories and Files\n## Viewing Files in Terminal\n## Searching\n## Environment Variables\n# File Manipulation\n## Job/process Manipulation\n## Remote Connections\n## Miscellaneous","[{\"question\":\"How do you list files and move between directories in UNIX?\",\"answer\":\"Use ls to list directory contents and cd to change directories. You can navigate using ., .., ~ for the home directory, and - for the previous directory.\"},{\"question\":\"Which commands help search within files and locate files on disk?\",\"answer\":\"Use grep to search for words in files. Use find to search a path for files or directories matching specific criteria, such as by name or type.\"},{\"question\":\"How can you manage processes and work in the background?\",\"answer\":\"Run jobs in the background with \\u0026, inspect with jobs, and view processes with ps or top. Use Ctrl-c to cancel and Ctrl-z to pause, then resume with bg or bring back with fg.\"}]","UNIX Command Cheat Sheet - quick reference for common commands | PDF",1791933637]