In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the commonly used Linux command exec for you. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Linux common commands exec commands are used to invoke and execute instructions. The exec command is usually used in shell scripting programs, and other commands can be called. If the command is used in the current terminal, the terminal exits immediately after the specified command is executed.
Syntax exec (option) (parameter) option-c: executes the specified command in an empty environment. Parameter instruction: the instruction to be executed and the corresponding parameters.
Example 1
[tank@linux test] # sudo su # get root permission [root@linux test] # exec ls # execute ls command abc.sh abc.sh.bz2 ar_test examples.desktop rec00001abc.sh.bz2 test test.bz2 [tank@linux test] # # end of execution, return to tank user example 2
# for example, when performing a find operation, you can add the exec command after find to perform additional processing on the content of the query [root@localhost bai] # find /-name bai-exec ls-al {}\; the total amount is 20 drwxr-xr-x. 3 root root 4096 September 16 02:09 Drwxr-xr-x. 577 root root 12288 September 16 02:12.. Drwxr-xr-x. 2 root root 4096 September 23 2011 LC_MESSAGES total dosage 12 drwxr-xr-x. 3 root root 4096 September 20 18:45. Drwxr-xr-x. 3 root root 4096 September 20 18:45.. Drwxr-xr-x. 3 root root 4096 September 20 18:45 total dosage of zeng 8 dmurt. 2 root root 4096 September 17 01:40. Drwxr-xr-x. 3 root root 4096 September 17 22:54.. The total dosage was 24 drwxr-xr-x. 3 root root 4096 September 23 12:09. Dr-xr-x---. 35 root root 4096 September 24 19:43.. -rwxr-xr-x. 1 root root 5009 September 23 11:26 a.out drwxr-xr-x. 3 root root 4096 September 23 14:30 bai-rwxrwxrwx. 1 root root 169.23 11:25 hell.c on "how to use Linux commands exec" 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, please share it out for more people to see.
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.