[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571887-105":53,"doc-detail-571887-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","linuxbash-quick-reference-bash-command-cheatsheet","Linux/Bash Quick Reference - Bash command cheatsheet","","Linux/Bash Quick Reference covers practical shell essentials for discovering the environment, listing and navigating files, creating and removing directories, and editing files with common editors. It explains downloading, uncompressing, and transferring archives via wget/curl and scp, plus viewing file content with cat/more/less and measuring lines, words, and characters. The guide also summarizes shell patterns using wildcards, output redirection and pipelines, and provides starter Bash scripts with variables, loops, and conditionals.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/linuxbash-quick-reference-bash-command-cheatsheet/571887/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/linuxbash-quick-reference-bash-command-cheatsheet/571887.png","ImageObject",442,249,{"name":88,"@type":89},"วิน","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"How do I list files and directories with useful options in Linux?","Question",{"text":109,"@type":110},"Use ls with flags such as -l for a detailed listing and -a for hidden files. The notes also mention help via --help or man ls, and creating an alias like ll=‘ls-l’.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"What commands are used to create and remove directories?",{"text":114,"@type":110},"Create directories with mkdir and optionally create them with parents using mkdir -p. Remove directories with rmdir, and recursively delete directories and contents with rm -r or rm -fr as referenced.",{"name":116,"@type":107,"acceptedAnswer":117},"How do I redirect output and connect commands in Bash?",{"text":118,"@type":110},"Use > to redirect stdout to a file and >> to append. Use 2> for stderr and &> for both. Connect commands using pipes (|) so the output of one command becomes the input of the next.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},571887,1792018094,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":79,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":73},2336475104736,"https://ap-avatar.wpscdn.com/avatar/22000c4c5e0e5b17e70?x-image-process=image/resize,m_fixed,w_180,h_180&k=1786591360781797222","Linux/Bash Quick Reference  \nHPC Shell software carpentry lesson chapters 3-6  \n[http://www.hpc-carpentry.org/hpc-shell/](http://www.hpc-carpentry.org/hpc-shell/)  \nDiscovering Your Environment  \npwd  \nhostname  \nls  \nls-l -a-h  \nls —help or man ls alias ll=‘ls-l’  \nprint working directory  \nget the name of the current host computer  \nListing Files and Directories  \nlist short-list ﬁles and directories  \nﬂags for longer list, hidden ﬁles, and human readable to get more help on any command  \nassign ls-l to ll. Must be quoted. Linux is very customizable.  \ncommands are programs, case sensitive, you can combine ﬂags like ls-lah  \nCreating and Removing Directories  \nmkdir test_dir  \nmkdir-p test_dir rmdir test_dir  \ncd test_dir  \ncd ~/test_dir  \ncd /homes/daveturner  \ncd ../dir cd  \ntouch ﬁle.txt mv ﬁle.txt test_dir mv ﬁle.txt ﬁle2 .txtcp ﬁle2.txt ﬁle.txt  \ncp-rp dir dir2  \nrm ﬁle2 .txt  \nrm-fr dir2  \nnano ﬁle.txt vi ﬁle.txt  \nMobaXTerm  \nmake directory-spaces separate arguments, use underscores-p protects against errors if directory already exists  \nremove a directory, must be empty  \nNavigating Through the Directory Tree  \nchange directory  \nabsolute path from home directory  \nabsolute path starting at root /  \nrelative path with .. meaning go back one directory  \ngo back to your home directory, same as cd ~  \nCreating and Manipulating Files  \ncreate an empty ﬁle. Suﬃxes can be meaningful.  \nmove a ﬁle to a diﬀerent location  \nrename the ﬁle instead  \ncopy the ﬁle and its contents  \ncopy the entire directory and maintain modiﬁcation dates remove a ﬁle  \nrecursively remove a directory and contents  \nEditting Files  \nedit a ﬁle using nano-control characters at the bottom edit a ﬁle using vi or vim- :wq to save and quit  \n[https://www.tutorialspoint.com/unix/unix-vi-editor.htm](https://www.tutorialspoint.com/unix/unix-vi-editor.htm)  \nedit ﬁles on Windows system and sync with Linux system  \nDownloading and Uncompressing Files  \nwget [http://www.hpc-carpentry.org/hpc-shell/](http://www.hpc-carpentry.org/hpc-shell/)ﬁles/bash-lesson.tar.gz curl-O [http://www.hpc-carpentry.org/hpc-shell/](http://www.hpc-carpentry.org/hpc-shell/)ﬁles/bash-lesson.tar.gz  \ntar-xvzf bash-lesson.tar.gz gzip/gunzip  \ncompress/uncompress zip/unzip  \nscp ﬁle.txt [username@hpc.edu](username@hpc.edu)  \ndecompress and expand the archive compress/expand data with .gz suﬃx  \ncompress/expand data with .Z suﬃx  \ncompress/expand data with .zip suﬃx  \nuse scp to transfer ﬁles from local system to Linux system  \ncat/more/less ﬁle.txt head/tail-1 ﬁle.txt wc-l ﬁle.txt  \nDisplaying File Contents  \ndisplay the contents of a ﬁle to the terminal display the ﬁrst/last line of the ﬁle  \ncount the number of lines (-l), words (-w) or characters (-c)  \nWildcards  \n(test wildcards with ls-l ﬁrst to make sure you are choosing the desired ﬁles)  \nwildcard *  \nwildcard ?  \nwildcard [a-e,w,z] ls-l *_ 1.fastq wc-l S*[89]_?.fastqgrep Act5 dmel-all*  \nmatches any number of type of characters (anything) matches any single character  \nmatches any single character to a list or range will list all ﬁles ending with _ 1.fastq  \ncount lines in ﬁles with 8 or 9 before the underscore display only lines with Act5 in them  \nRedirecting Output  \necho “Hello there”  \necho “Hello there” > ﬁle.txt host=`hostname`  \necho “from $host” >> ﬁle.txt grep Act5 dmel-all* | wc-l  \necho a string to the terminal  \n> will redirect the stdout output to a ﬁle run hostname and store in variable $host >> to append, 2> for stderr, &> for both  \npipes link output of one command to input of the next  \n[https://www.gnu.org/software/bash/manual/html_node/Bash-Features.html](https://www.gnu.org/software/bash/manual/html_node/Bash-Features.html)[ ](https://www.gnu.org/software/bash/manual/html_node/Bash-Features.html)[https://www.geeksforgeeks.org/bash-scripting-for-loop/](https://www.geeksforgeeks.org/bash-scripting-for-loop/)  \nWriting Bash Scripts  \n\\#!/bin/bash  \nchmod u+[x script.sh](x script.sh)[ ](x script.sh)ls-l  \n./","cbCaish9zfxgyxll","https://ap.wps.com/l/cbCaish9zfxgyxll","pdf",54491,"English","# Discovering Your Environment\n## Listing Files and Directories\n## Creating and Removing Directories\n# Navigating Through the Directory Tree\n## Absolute and Relative Paths\n# Creating and Manipulating Files\n## Copying, Renaming, Removing\n# Editing Files\n# Downloading and Uncompressing Files\n# Displaying File Contents\n# Wildcards\n# Redirecting Output\n## Redirect, Append, Pipes\n# Writing Bash Scripts\n## Variables, Loops, Conditionals","[{\"question\":\"How do I list files and directories with useful options in Linux?\",\"answer\":\"Use ls with flags such as -l for a detailed listing and -a for hidden files. The notes also mention help via --help or man ls, and creating an alias like ll=‘ls-l’.\"},{\"question\":\"What commands are used to create and remove directories?\",\"answer\":\"Create directories with mkdir and optionally create them with parents using mkdir -p. Remove directories with rmdir, and recursively delete directories and contents with rm -r or rm -fr as referenced.\"},{\"question\":\"How do I redirect output and connect commands in Bash?\",\"answer\":\"Use \\u003e to redirect stdout to a file and \\u003e\\u003e to append. Use 2\\u003e for stderr and \\u0026\\u003e for both. Connect commands using pipes (|) so the output of one command becomes the input of the next.\"}]","Linux/Bash Quick Reference - Bash command cheatsheet | PDF",1791924237]