Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux dirname command

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you how to use the Linux dirname command related knowledge points, detailed content, clear logic, I believe most people are still too familiar with this knowledge, so share this article for your reference, I hope you read this article after some gains, let's take a look at it.

The dirname command removes the non-directory portion of the file name and displays only the contents related to the directory. The dirname command reads the specified pathname, retains the last/and the characters after it, deletes the rest, and writes the result to standard output.

dirname Remove the non-directory part of the filename

If there is no character after the last/, the dirname command uses the penultimate/and ignores all subsequent characters. Dirname and basename are often used interchangeably within shell commands to specify an output filename that differs slightly from the specified input filename.

syntax dirname(option)(parameter) option--help: display help; --version: display version number. Instance dirname //Result is/ dirname /a/b/Result is: /a dirname a Result is. dirname a/b The result is pathname a above is "Linux dirname command how to use" All the contents of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report