In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what are the redirect commands under Linux, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.
Linux redirection refers to modifying some of the original default things, changing the default execution mode of the original system commands, for example, simply I do not want to see the output in the monitor but want to output to a file, I can do this work through Linux redirection.
1. Redirect: 1. Output redirection: causes the user to redirect the output of a command to a file instead of displaying it on the screen: 1 >: overwrite 1 > >: append 2. Error redirection: 2 > 2 > > 13. Both right and wrong are redirected to the same location: 2 > & 1; & >
two。 Command wildcard: * matches any character of any length? Match any single character [] match any single character within the specified range [^] match any single character outside the specified range [[: upper:] all uppercase letters [: lower:]] all lowercase letters [[: alpha:]] match all letters [: digit:]] all numbers [: alnum:] letters and numbers [: space:]] white space characters [[: Punct:]] punctuation marks show details
3. Common command: 1.ls command usage: ls:ls [OPTION]. [FILE]...
Option usage ls lists files and directories under the current directory-a shows all files including hidden files-A shows all files including hidden files but except. And... -c is sorted by ctime,-lt is used together with-l to display information such as file attributes and permissions in long data format-t is sorted by modification time-d lists the directory itself, instead of the contents of the directory-I list the inode number of the file is generally used with-l to display the file size in kB MB GB format 2.pwd command usage: pwd: show the current working directory absolute path-L: display the current path Whether there is a linked file or not, it is displayed with no options-P: displays the current path, and if there is a linked file, directly displays the file to which the linked file points
3.cd command usage: cd: change the working directory ~: user's home directory -: represents the previous working directory. Superior directory.: current directory
4.date command usage: date: display or modify the system time and date date [OPTION]. [+ FORMAT] date [- u |-utc |-universal] MMDDhhmm [[CC] YY]
-d "string": the date and time referred to in the string do not represent the current time not now-s "string": set the date and time according to the string 5.passwd command usage: passwd: set the user password (only root users have permission to use it)
Option usage-password can still be used after k expires-llock, lock user password, only root has permission to operate-u unlock-f mandatory operation: only root has permission-n days: minimum number of days for two password changes-x days days for two password changes-stdin password to obtain password from standard input Non-interactive setting password use-w days distance how many days to remind the user to change the password-S query password status-how many days after the I days password expires, the user is disabled to display details
6.su command usage: su: change the user identity su-username-c commond: change the user to the user of user, execute the commomd command, and then change back to the original user -: the user's environment variable switch
7. Clear screen: clear= CTRL+L
Thank you for reading this article carefully. I hope the article "what are the redirection commands under Linux" shared by the editor will be helpful to you? at the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.