{"id":14700,"date":"2020-09-24T19:58:30","date_gmt":"2020-09-24T11:58:30","guid":{"rendered":"https:\/\/nusit.nus.edu.sg\/?p=14700"},"modified":"2020-09-25T03:34:54","modified_gmt":"2020-09-24T19:34:54","slug":"command-line-tips-2","status":"publish","type":"post","link":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/","title":{"rendered":"\u00bb Command Line Tips 2"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h4>Command Line Tips 2<\/h4>\n<p><em>By Ku Wee Kiat, Research Computing, NUS Information Technology<\/em><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-13391\" src=\"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png\" alt=\"\" width=\"746\" height=\"448\" \/><\/p>\n<p>\u00a0<\/p>\n<p>In the previous article <a href=\"https:\/\/nusit.nus.edu.sg\/technus\/data-manipulation-and-more-with-the-command-line\/\">\u00bb Data Manipulation and More with the Command Line<\/a> we covered some bash basics like pipes and variables. We also covered bash utilities that are useful for data manipulation.<\/p>\n<p>In this installment of Command Line tips and tricks we will go back to the basics:<\/p>\n<ol>\n<li>Keyboard Shortcuts<\/li>\n<li>Pathname Expansion<\/li>\n<\/ol>\n<p>As HPC users, we often work in the Linux terminal. We need to be productive in a pure text environment where the only interface you can use to control it is the keyboard. What you enter is what you get, if you do not execute the command to list a directory\u2019s contents, you will not know what is inside the directory. So how can we do the things in the most productive way? \u00a0Yes, by using shortcuts!<\/p>\n<h5>Keyboard Shortcuts<\/h5>\n<h6>Working with the current line<\/h6>\n<p>Besides using arrow keys to move around the current line, there are a few simple shortcuts to do things faster.<\/p>\n<p>Do note that the shortcuts are not case sensitive. E.g.: Ctrl + A =&gt; hold Ctrl key and \u2018a\u2019 key together.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"312\">\n<p><strong>Action<\/strong><\/p>\n<\/td>\n<td width=\"312\">\n<p><strong>Shortcut<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Go to start of line<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + A<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Go to end of line<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + E<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Go to next word<\/p>\n<\/td>\n<td width=\"312\">\n<p>Alt + F<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Go to previous word<\/p>\n<\/td>\n<td width=\"312\">\n<p>Alt + B<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>Deleting Text<\/h6>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"312\">\n<p><strong>Action<\/strong><\/p>\n<\/td>\n<td width=\"312\">\n<p><strong>Shortcut<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Delete current character<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + D<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Delete previous word<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Delete next word<\/p>\n<\/td>\n<td width=\"312\">\n<p>Alt + D<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>Cutting and Pasting<\/h6>\n<p>We have covered navigation and deletion; it is time now for one of our favourites: Cut &amp; Paste.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"312\">\n<p><strong>Action<\/strong><\/p>\n<\/td>\n<td width=\"312\">\n<p><strong>Shortcut<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Cut current word before cursor<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Cut from cursor to end of line<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + K<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Cut from cursor to start of line<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + U<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"312\">\n<p>Paste the cut buffer at current position<\/p>\n<\/td>\n<td width=\"312\">\n<p>Ctrl + Y<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Shell Expansions<\/h5>\n<p>What are shell expansions? They are symbols that can be expanded to a longer string or command. Let\u2019s take a look at some examples:-<\/p>\n<h6>The Tilde ~<\/h6>\n<p>The tilde is useful when you want to reference your home directory. It is the equivalent to the full path of your home directory.<\/p>\n<p>In NUS HPC, this would be:<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>~ == \/home\/svu\/e0123456<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Rather than typing out the full path to your home directory or any file or folder in your home directory, you can replace it with the tilde.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ ls ~<\/p>\n<p># rather than<\/p>\n<p>$ ls \/home\/svu\/e0123456<\/p>\n<p>\u00a0<\/p>\n<p>$ cat ~\/my_text_file.txt<\/p>\n<p># rather than<\/p>\n<p>$ cat \/home\/svu\/e0123456\/my_text_file.txt<\/p>\n<p>\u00a0<\/p>\n<p>$ ls ~\/kitti_dataset<\/p>\n<p># rather than<\/p>\n<p>$ ls \/home\/svu\/e0123456\/kitti_dataset<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>How many keypresses did the tilde save you?<\/p>\n<h5>Pathname Expansion<\/h5>\n<p>This allows you to write a short path pattern and it will expand to a list of files and directories.<\/p>\n<h6>Using *<\/h6>\n<p>The wildcard character * matches any string. It can be used as a prefix or a suffix.<\/p>\n<p>For example, if you want to list all json files in a directory: ls my_directory\/*.json will give you all json files in my_directory.<\/p>\n<p>If you have a directory with files that have prefixes: train, test, val and you just want all the train files: ls dataset_directory\/train*<\/p>\n<p>All train files that are jpg format: ls dataset_directory\/train*.jpg<\/p>\n<p>With the following directory structure<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>abc@123a:\/media\/docker_mnt\/mask_dataset$ tree\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 README.dataset.txt\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 README.txt\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 test\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 0_Concern-In-China-As-Mystery-Virus-Spreads_jpg.rf.3135dfc5feab288d76a4ccfd22dfc5bf.jpg<\/p>\n<p>\u251c\u2500\u2500 1224331650_g_400-w_g_jpg.rf.b816f49e2d84044fc997a8cbd55c347d.jpg\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 15391513324714o1n0r10n6_jpg.rf.a91fbc7be8a94ed3c48d2e4b35bd53bb.jpg\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 15391513329330sooq10859_jpg.rf.89c8524c2096175fa2c728e5d73f1c28.jpg<\/p>\n<p>\u251c\u2500\u2500 1579924271_jpg.rf.be5b27c2b2801bccc191e6dbd9bfccca.jpg\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 _annotations.coco.json\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u251c\u2500\u2500 w1240-p16x9-fa978043deff83fed485af12d16e39c61398fc30_jpg<\/p>\n<p>\u251c\u2500\u2500 train<\/p>\n<p>\u2502\u00a0\u00a0 \u251c\u2500\u2500 000_1ov3n5_0_jpeg.rf.a23f1c89491779996f4519858277a4e0.jpg<\/p>\n<p>\u2502\u00a0\u00a0 \u251c\u2500\u2500 0002526673_jpg.rf.2c547115c01c1b5a10c6d467551f0cae.jpg<\/p>\n<p>\u2502\u00a0\u00a0 \u251c\u2500\u2500 000b7b75-1600_jpg.rf.5d7117e8571505dbfe49e2f737089ea0.jpg<\/p>\n<p>\u2502\u00a0\u00a0 \u251c\u2500\u2500 001_1024_jpeg.rf.f915f4689737658b59732df33fdbee22.jpg<\/p>\n<p>\u2502\u00a0\u00a0 \u251c\u2500\u2500 003_1024_jpeg.rf.bc025d99896124ddce6fa706b4a5c7b3.jpg<\/p>\n<p>\u2502\u00a0\u00a0 \u2514\u2500\u2500\u00a0 004_1024_jpeg.rf.763d99dadfb9fe5f3f72ff3cc34f88b6.jpg<\/p>\n<p>\u2514\u2500\u2500 valid\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0 \u251c\u2500\u2500 000_1OC3DT_jpg.rf.0570a1f4ab79e324496c311456b6b1f8.jpg<\/p>\n<p>\u00a0\u00a0\u00a0 \u251c\u2500\u2500 0009S6815V3PEU1N-C123-F4_jpg.rf.6b0befd018e6308b6029a17a2ee08c48.jpg<\/p>\n<p>\u00a0\u00a0\u00a0 \u251c\u2500\u2500 002_1024_jpeg.rf.b8c41940cb8dd4fa61e92892345859ad.jpg\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0 \u251c\u2500\u2500 0109-00176-096b1_jpg.rf.c55de2d88f34d1217acdc245fd8292fa.jpg\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0 \u2514\u2500\u2500 022814asiatodaymasks_960x540_jpg.rf.20ad64bc5ec9eed694d9f559b9aba31d.jpg<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We can see that the test directory is empty and that there are jpg files outside of either test\/train\/valid directories. Let\u2019s assume that the stray jpg files belongs to the test directory and we need to move it back to where it belongs. Pause for a moment to think of what would be the appropriate command using path expansion.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>mv *.jpg test\/<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We can also use * in the following way to list all jpg files in all sub directories:<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ ls *\/*.jpg<\/p>\n<p>val\/pic1.jpg\u00a0\u00a0 val\/pic3.jpg\u00a0\u00a0 val\/pic5.jpg\u00a0 val\/pic7.jpg<\/p>\n<p>val\/pic2.jpg\u00a0\u00a0 val\/pic4.jpg\u00a0\u00a0 val\/pic6.jpg\u00a0 train\/1.jpg<\/p>\n<p>test\/2.jpg<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>Braces<\/h6>\n<p>Brace expansion allows the shell to generate multiple strings based on the tokens in the curly braces.<\/p>\n<p>For example, to quickly create train\/test\/val directories:<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ mkdir ~\/my_dataset\/{train,test,val}<\/p>\n<p>$ ls ~\/my_dataset<\/p>\n<p>train\u00a0\u00a0 test\u00a0\u00a0 val<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We can also do the following:-<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ mkdir ~\/my_dataset\/{train,test,val}_set<\/p>\n<p>$ ls ~\/my_dataset<\/p>\n<p>train_set\u00a0\u00a0 test_set\u00a0\u00a0 val_set<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>It can also be used to create files\/folders with sequential (numeric) names.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ touch ~\/dataset\/test\/sounds\/noise-{1..5}.wav<\/p>\n<p>$ ls ~\/dataset\/test\/sounds\/<\/p>\n<p>noise-1.wav noise-2.wav noise-3.wav noise-4.wav noise-5.wav<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ touch ~\/test\/class_{1..10..2}<\/p>\n<p>$ ls ~\/test<\/p>\n<p>class_1 class_3 class_5 class_7 class_9<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>It most definitely can be used for listing files as well.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">\n<p>$ ls ~\/dataset\/test\/{*.jpg,*.png}<\/p>\n<p>01.jpg\u00a0 02.png\u00a0 02.jpg\u00a0 03.png<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We hope these tips and tricks covered in this article will increase your productivity in the HPC environment. These skills are useful whenever and wherever you are as long as you need to work in the UNIX terminal.<\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Ku Wee Kiat, Research Computing, NUS Information Technology,  on 24 September 2020<\/p>\n<p>As HPC users, we often work in the Linux terminal. We need to be productive in a pure text environment where the only interface you can use to control it is the keyboard. What you enter is what you get, if you do not execute the command to list a directory\u2019s contents, you will not know what is inside the directory. So how can we do the things in the most productive way?  Yes, by using shortcuts!<\/p>\n","protected":false},"author":96,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_oasis_is_in_workflow":0,"_oasis_original":0,"footnotes":""},"categories":[69,120,68],"tags":[248,145],"class_list":["post-14700","post","type-post","status-publish","format-standard","hentry","category-hpc-newsletter","category-hpc-tips-and-tricks","category-technus","tag-2020-09","tag-hpc_at_nus_newsletter"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance\" \/>\n<meta property=\"og:description\" content=\"By Ku Wee Kiat, Research Computing, NUS Information Technology, on 24 September 2020 As HPC users, we often work in the Linux terminal. We need to be productive in a pure text environment where the only interface you can use to control it is the keyboard. What you enter is what you get, if you do not execute the command to list a directory\u2019s contents, you will not know what is inside the directory. So how can we do the things in the most productive way? Yes, by using shortcuts!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/\" \/>\n<meta property=\"og:site_name\" content=\"NUS Information Technology | NUS IT Services, Solutions &amp; Governance\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-24T11:58:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-24T19:34:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png\" \/>\n<meta name=\"author\" content=\"Yeo Eng Hee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yeo Eng Hee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/\",\"url\":\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/\",\"name\":\"\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance\",\"isPartOf\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png\",\"datePublished\":\"2020-09-24T11:58:30+00:00\",\"dateModified\":\"2020-09-24T19:34:54+00:00\",\"author\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/80aa44951a0064079b1331819d1dde1c\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage\",\"url\":\"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png\",\"contentUrl\":\"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png\",\"width\":746,\"height\":448},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#website\",\"url\":\"https:\/\/nusit.nus.edu.sg\/\",\"name\":\"NUS Information Technology | NUS IT Services, Solutions &amp; Governance\",\"description\":\"Borderless University, powered by Infinite Technology\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nusit.nus.edu.sg\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/80aa44951a0064079b1331819d1dde1c\",\"name\":\"Yeo Eng Hee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/058ba350a3203dbe3957aa683b473d03?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/058ba350a3203dbe3957aa683b473d03?s=96&d=mm&r=g\",\"caption\":\"Yeo Eng Hee\"},\"url\":\"https:\/\/nusit.nus.edu.sg\/author\/cceyeoeh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/","og_locale":"en_US","og_type":"article","og_title":"\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance","og_description":"By Ku Wee Kiat, Research Computing, NUS Information Technology, on 24 September 2020 As HPC users, we often work in the Linux terminal. We need to be productive in a pure text environment where the only interface you can use to control it is the keyboard. What you enter is what you get, if you do not execute the command to list a directory\u2019s contents, you will not know what is inside the directory. So how can we do the things in the most productive way? Yes, by using shortcuts!","og_url":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/","og_site_name":"NUS Information Technology | NUS IT Services, Solutions &amp; Governance","article_published_time":"2020-09-24T11:58:30+00:00","article_modified_time":"2020-09-24T19:34:54+00:00","og_image":[{"url":"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png"}],"author":"Yeo Eng Hee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yeo Eng Hee","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/","url":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/","name":"\u00bb Command Line Tips 2 - NUS Information Technology | NUS IT Services, Solutions &amp; Governance","isPartOf":{"@id":"https:\/\/nusit.nus.edu.sg\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage"},"image":{"@id":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage"},"thumbnailUrl":"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png","datePublished":"2020-09-24T11:58:30+00:00","dateModified":"2020-09-24T19:34:54+00:00","author":{"@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/80aa44951a0064079b1331819d1dde1c"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nusit.nus.edu.sg\/technus\/command-line-tips-2\/#primaryimage","url":"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png","contentUrl":"https:\/\/nusit.nus.edu.sg\/wp-content\/uploads\/2020\/05\/DataManip-1.png","width":746,"height":448},{"@type":"WebSite","@id":"https:\/\/nusit.nus.edu.sg\/#website","url":"https:\/\/nusit.nus.edu.sg\/","name":"NUS Information Technology | NUS IT Services, Solutions &amp; Governance","description":"Borderless University, powered by Infinite Technology","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nusit.nus.edu.sg\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/80aa44951a0064079b1331819d1dde1c","name":"Yeo Eng Hee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/058ba350a3203dbe3957aa683b473d03?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/058ba350a3203dbe3957aa683b473d03?s=96&d=mm&r=g","caption":"Yeo Eng Hee"},"url":"https:\/\/nusit.nus.edu.sg\/author\/cceyeoeh\/"}]}},"_links":{"self":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts\/14700"}],"collection":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/comments?post=14700"}],"version-history":[{"count":0,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts\/14700\/revisions"}],"wp:attachment":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/media?parent=14700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/categories?post=14700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/tags?post=14700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}