{"id":32814,"date":"2020-10-08T16:37:14","date_gmt":"2020-10-08T16:37:14","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=32814"},"modified":"2024-04-24T16:26:22","modified_gmt":"2024-04-24T16:26:22","slug":"drag-drop-pasting-file-path-into-terminal","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2020\/10\/drag-drop-pasting-file-path-into-terminal\/","title":{"rendered":"[Quick Tip] Drag and Drop Pasting File \/ Folder Path into Terminal"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/10\/terminal-icon.png\" alt=\"\" width=\"245\" height=\"250\" class=\"aligncenter size-full wp-image-32816\" \/><\/p>\n<p>Familiar with Linux commands? You may already know many tips and tricks that will save you a lot of time.<\/p>\n<p>Here are some that I have been using for a long period of time, including <b>Tab auto-completion<\/b>, when you type something in Linux terminal and hit <b>Tab<\/b>, it auto-completes the command or file path, or outputs all possible options.<\/p>\n<p>And <b>Ctrl+Shift+V<\/b> will do paste text to terminal instead of <i>Ctrl+V<\/i>. Without copying to the clipboard, you can simply select \/ highlight the text and use <b>mouse middle-click to paste<\/b> into terminal.<\/p>\n<p>Today I found a new terminal tips that I didn&#8217;t know before. Thanks to <a href=\"https:\/\/www.reddit.com\/r\/linux\/comments\/j5xngc\/til_you_can_drop_and_drag_files_to_the_terminal\/\" target=\"_blank\" rel=\"noopener\">the reddit<\/a>, I&#8217;m going to share it with you by following steps.<\/p>\n<p><b>1. Drag and drop file or folder to paste the path into terminal.<\/b><\/p>\n<p>Just drag and drop a file or folder into terminal, and you&#8217;ll see the full path pasted with single quotes. It&#8217;s useful if there&#8217;s special character in file path or you just don&#8217;t want to type &#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/10\/dragdrop-file.gif\" alt=\"\" width=\"600\" height=\"297\" class=\"aligncenter size-full wp-image-32818\" \/><\/p>\n<p><b>2. Drag and drop a selection of text into terminal.<\/b><\/p>\n<p>You can also drag and drop a selection of text into terminal, so you don&#8217;t need to do copy and paste with context menu clicks or keyboard shortcuts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/10\/dragdroptext.gif\" alt=\"\" width=\"600\" height=\"297\" class=\"aligncenter size-full wp-image-32817\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Familiar with Linux commands? You may already know many tips and tricks that will save you a lot of time. Here are some that I have been using for a long period of time, including Tab auto-completion, when you type something in Linux terminal and hit Tab, it auto-completes the command or file path, or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[19],"class_list":["post-32814","post","type-post","status-publish","format-standard","hentry","category-command-skills","tag-command-skill"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/32814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=32814"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/32814\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=32814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=32814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=32814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}