29 C
Jaipur
Wednesday, December 2, 2020

Drag And Drop Files And Folders In Terminal To Print Their Absolute Path

Must read

How To Use Instagram Filters: From Clarendon To Nashville, Explained!

“Isn’t that photo too plain?” “That would look would superb in monochrome!” “That’s definitely not the natural color.” Some of the things you can...

Opera GX Browser Gets Dynamic Razer Chroma RGB Lighting Effects

If you’re an Opera GX browser user with a shiny Razer RGB keyboard, there’s good news. Both companies have worked together to bring official...

How To Use A Keyboard Shortcut To Toggle Always On Top On GNOME, KDE, MATE, Xfce and Cinnamon Desktops

This article shows how to use a keyboard shortcut to set a window to be always on top, on GNOME, MATE, Xfce, Cinnamon and...

Did you know you can simply drag and drop files and folders in terminal to print their absolute path? No? No problem! This quick tip will teach you how to quickly paste the actual path of a file or a folder in Terminal by drag and drop in Linux and Unix-like systems.

Let us say, you want to run an executable script stored somewhere in your Linux system. You can do it from command line in three ways. Move the script to your $PATH, so you can run it directly using its name. Secondly, just go to the location where you saved the script and run it. Thirdly, you can run it from anywhere by specifying its absolute path, something like path/to/the/script.

For instance, I was testing Sysmon program yesterday. At present, I launch it every time using its full path like this – python sysmon/src/sysmon.py. It is just an example. You might often have to type the absolute path of a file or folder in the Terminal for any reason. Instead of typing the whole path manually each time, you can simply use the built-in drag and drop mechanism to print the full path of a file or folder in Terminal as shown below.

Drag And Drop Files And Folders In Terminal To Print Their Absolute Path

To print the absolute path of a file or folder in the Terminal, just drag and drop them inside the Terminal window. The full path of the dragged will instantly appear.

Print absolute path of a file by drag and drop:

Drag and drop files in Terminal to print their absolute path

Print absolute path of a folder by drag and drop:

Drag and drop folders in Terminal to print their absolute path

Here is a short visual demo.

Drag And Drop Files And Folders In Terminal To Print Their Absolute Path

It’s quite handy, isn’t? No need to type the long path over and over. Just drag and drop the files or folders to paste their absolute path instantly in the Terminal. Hope it was useful to you too.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How To Use Instagram Filters: From Clarendon To Nashville, Explained!

“Isn’t that photo too plain?” “That would look would superb in monochrome!” “That’s definitely not the natural color.” Some of the things you can...

Opera GX Browser Gets Dynamic Razer Chroma RGB Lighting Effects

If you’re an Opera GX browser user with a shiny Razer RGB keyboard, there’s good news. Both companies have worked together to bring official...

How To Use A Keyboard Shortcut To Toggle Always On Top On GNOME, KDE, MATE, Xfce and Cinnamon Desktops

This article shows how to use a keyboard shortcut to set a window to be always on top, on GNOME, MATE, Xfce, Cinnamon and...