[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571658-105":53,"doc-detail-571658-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","linux-cheat-sheet-file-and-directory-management","Linux Cheat Sheet - File and Directory Management","","Linux Cheat Sheet provides a compact, command-focused reference for common tasks across file and directory operations, permissions, ownership, process handling, networking diagnostics, compression, and basic system information. It lists frequently used commands with short explanations of what each one does, plus practical examples to help readers apply them quickly in terminal workflows. The coverage supports both beginner learning and routine troubleshooting needs.",{"@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/linux-cheat-sheet-file-and-directory-management/571658/",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/linux-cheat-sheet-file-and-directory-management/571658.png","ImageObject",442,249,{"name":88,"@type":89},"jayni","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",8,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"Which commands are used to list and inspect directory or file information?","Question",{"text":109,"@type":110},"Use ls to list directory contents, pwd to print the current directory path, and stat to display detailed file or directory status.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How do you create, delete, and rename files or directories?",{"text":114,"@type":110},"Use mkdir to create directories, rm to delete files or directories (optionally recursively with -r), and mv to move or rename items.",{"name":116,"@type":107,"acceptedAnswer":117},"What commands help manage running processes and view system load?",{"text":118,"@type":110},"Use ps to show active processes, top to monitor processes in real time, htop for an enhanced interactive view, and kill/killall/pkill to terminate processes.","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},571658,1792014841,{"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":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":101},3985747859343,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Linux Cheat Sheet  \nFile and Directory Management  \n[1.](1. ls-Lists)[ ls](1. ls-Lists)[-Lists](1. ls-Lists) directory contents.  \no ls-Basic list.  \no ls-l -List with details .  \no Example: ls-la Directory  \n[2.](2. cd-Change the)[ cd](2. cd-Change the)[-Change the](2. cd-Change the) current directory.  \no cd Directory-Changes to \"Directory\" .  \no Example: cd /home  \n3. pwd-Print the current directory path.  \no pwd-Outputs the current directory.  \no Example: pwd  \n4. mkdir-Create a new directory.  \no mkdir Directory-Creates \"Directory\" .  \no Example: mkdir /home/Directory  \n5. rmdir-Remove an empty directory.  \no rmdir Directory-Deletes \"Directory\" .  \no Example: rmdir /home/Directory  \n6. rm-Delete ﬁles and directories .  \no rm ﬁle-Deletes \"ﬁle\" .  \no rm-r Directory-Deletes \"Directory\"recursively.  \no Example: rm-rf /home/Directory  \n7. cp-Copy ﬁles or directories .  \no cp ﬁle new_ﬁle-Copies \"ﬁle\" to \"new_ﬁle\" .  \no cp-r Directory new_directory-Copies\"Directory\" recursively.  \no Example: cp-r Directory /backup/  \n[8.](8. mv-Move or)[ mv](8. mv-Move or)[-Move or](8. mv-Move or) rename ﬁles and directories.  \no mv ﬁle new_ﬁle-Renames \"ﬁle\" to\"new_ﬁle\" .  \no Example: mv ﬁle /home/Directory/  \n9. touch-Create an empty ﬁle .  \no touch ﬁle-Creates \"ﬁle\" .  \no Example: touch /home/Directory/newﬁle  \n[10.](10. cat-Concatenate)[ cat](10. cat-Concatenate)[-Concatenate](10. cat-Concatenate) and display ﬁle contents.  \no cat ﬁle-Shows contents of \"ﬁle\" .  \no Example: cat ﬁle  \n11. less-View ﬁle content interacƟvely.  \no less ﬁle-Opens \"ﬁle\" in viewer.  \no Example: less ﬁle  \n12. more-View ﬁle content page-by-page .  \no more ﬁle-Views ﬁle with paging.  \no Example: more ﬁle  \n13. head-Show the ﬁrst few lines of a ﬁle .  \no head-n 5 ﬁle-Shows ﬁrst 5 lines .  \no Example: head ﬁle  \n14. tail -Show the last few lines of a ﬁle .  \no tail -n 5 ﬁle-Shows last 5 lines .  \no tail -f ﬁle-Shows last lines with live updates .  \no Example: tail -f /var/log/syslog  \n15. ﬁnd-Search for ﬁles and directories .  \no ﬁnd Directory-name \"* .txt\" -Searches for .txt ﬁles .  \no Example: ﬁnd /home-type f-name \"* .sh\"  \n16. locate-Find ﬁles by name (needs mlocate package) .  \no locate ﬁle-Searches for \"ﬁle\" .  \no Example: locate ﬁle  \n17. du-Disk usage of ﬁles and directories .  \no du-sh Directory-Shows size of \"Directory\" .  \no Example: du-h Directory  \n18. df-Display disk space usage .  \no df-h-Disk usage in human-readable format.  \no Example: df-h  \n19. stat-Display detailed ﬁle or directory status .  \no stat ﬁle-Shows stats of \"ﬁle\" .  \no Example: stat ﬁle  \n20. tree-Show directory structure in tree format.  \no tree Directory-Displays \"Directory\" structure .  \no Example: tree /home  \nFile Permissions and Ownership  \n21. chmod-Change ﬁle permissions .  \no chmod 755 ﬁle-Sets permissions for \"ﬁle\" .  \no Example: chmod +[x script.sh](x script.sh)  \n[22](22) . chown-Change ﬁle ownership.  \no chown user ﬁle-Changes owner to \"user\" .  \no Example: chown root ﬁle  \n23. chgrp-Change group ownership.  \no chgrp group ﬁle-Changes group to \"group\" .  \no Example: chgrp admin ﬁle  \n24. umask-Set default permissions for new ﬁles .  \no umask 022-Default ﬁle permissions .  \no Example: umask  \nProcess Management  \n[25.](25. ps-Show ac)[ ps](25. ps-Show ac)[-Show ac](25. ps-Show ac)Ɵve processes.  \no ps aux-Shows all processes .  \no Example: ps aux | grep nginx  \n[26.](26. top-Monitor)[ top](26. top-Monitor)[-Monitor](26. top-Monitor) system processes in real Ɵme.  \no top-Live view of processes .  \no Example: top  \n27. htop-Enhanced process viewer (requires htop) .  \no htop- InteracƟve process viewer.  \no Example: htop  \n28. kill -Terminate a process by ID.  \no kill 1234-Ends process with PID 1234.  \no Example: kill 1234  \n29. killall -Kill processes by name .  \no killall ﬁrefox-Kills all \"ﬁrefox\" processes .  \no Example: killall nginx  \n30. pkill -Kill processes by paƩern .  \no pkill -u user-Kills all processes for \"user\" .  \no Example: pkill -u john  \nNetworking  \n[31.](31. ping","cbCaii4kR76fPZeh","https://ap.wps.com/l/cbCaii4kR76fPZeh","pdf",628948,24,"English","# File and Directory Management\n## File Operations\n## Directory Operations\n# File Permissions and Ownership\n## chmod, chown, chgrp, umask\n# Process Management\n## ps, top, htop, kill, pkill","[{\"question\":\"Which commands are used to list and inspect directory or file information?\",\"answer\":\"Use ls to list directory contents, pwd to print the current directory path, and stat to display detailed file or directory status.\"},{\"question\":\"How do you create, delete, and rename files or directories?\",\"answer\":\"Use mkdir to create directories, rm to delete files or directories (optionally recursively with -r), and mv to move or rename items.\"},{\"question\":\"What commands help manage running processes and view system load?\",\"answer\":\"Use ps to show active processes, top to monitor processes in real time, htop for an enhanced interactive view, and kill/killall/pkill to terminate processes.\"}]","Linux Cheat Sheet - File and Directory Management | PDF",1791923008]