Tuesday, September 17, 2013

Get Directory path from a file path/Get file name from a filepath in shell Linux/Unix

Get Directory path from a file path.

Command : 

dirname /path/path1/filename

Output :

 /path/path

Get filename from a filepath

Command:

basename /path/path/filename

Output:

filaname

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

🎬 Installing Kali Linux on a Virtual Machine | Step-by-Step Guide 🐧

🎬 In this video, I’ll show you how to install Kali Linux 🐧 inside a Virtual Machine step-by-step! Whether you're a beginner curious...