In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to quickly open various types of files on the command line under the Ubuntu system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Under Ubuntu, you usually open a text file with a command line, such as the commands gedit, more, cat, vim, less. But when we need to open other format files, such as pdf, jpg, mp3 format files, we usually go to the directory where the files are located and double-click to open them, which affects our efficiency. In fact, you can open these format files, or even web pages, with the command xdg-open (opens a file or URL in the user's preferred application), as simple as opening a file.
Let me give you two examples:
The code is as follows:
Jelline@jelline:~$ xdg-open la_isla_bonita.mp3
Jelline@jelline:~$ xdg-open http://baidu.com
Jelline@jelline:~$ has created a new window in an existing browser session.
Xdg-open will choose the appropriate program to open the specified file, just like double-clicking to open it. On my computer, the first example will be opened with Totem Movie Player, and the second example will be opened with Google browser, not Firefox, because Google browser is my default browser.
The specific operations are as follows:
Xdg-open {file | URL}
Xdg-open {--help |-- manual |-- version}
OK, now is not much more convenient, through the shortcut key Ctrl+Alt+T can open shell,F11 can be full-screen display (Alt+F9 minimize window, Alt+F10 maximize / restore window), and then supplemented by the xdg-open command, greatly reduce the mouse operation, but also greatly improve the efficiency.
Some information of xdg-open manual is attached:
Xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. Xdg-open supports file, ftp, http and https URLs.
Xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root.
Thank you for reading! On "how to use the command line to quickly open various types of files under the Ubuntu system" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.