Linux Study Notes (2) Command Format and simple commands

Source: Internet
Author: User
Tags month name
Document directory
  • Command Format
  • Change supported language
  • Several simple commands

This article is my study notes on "laruence's Linux private house dish.

Command Format

Command Format: Command [-options] parameter1 parameter2...

For example:

gin@ubuntu :~$  ls -al ~

The command is LS; the option is-Al; the parameter is ~This command is used to list all files (including hidden files) in the main folder and related file attributes.

Where,-Lists All files in the main folder, including hidden files,-LList related file attributes.

Note:

  • In Linux, commands are case sensitive.
  • If the command is too long, use a backslash (\) to transfer the [enter] character. ([Enter] generally indicates the start of a line of commands. escape with a backslash)
  • The command must be treated as a space no matter how many consecutive spaces exist. For example:Gin @ Ubuntu :~ $ LS-Al ~EquivalentGin @ Ubuntu :~ $ LS-Al ~

Change Supported languages Echo $ LangCommand to display the current Supported languages. Use Lang = en_usCommand to change the current supported language. En_us stands for American English. As follows: Note: this is only because the supported language is changed during the current login.

Several simple commands 1. Help Command: -- Help 2. Display Date and Time: DateUse Date -- HelpSome formats of Help Command calling % A literal %
% A locale's abbreviated weekday name (e.g., Sun)
% A locale's full weekday name (e.g., Sunday)
% B locale's abbreviated month name (e.g., Jan)
% B locale's full month name (e.g., January)
% C locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
% C century; like % Y, percentage t omit last two digits (e.g., 20)
% D day of month (e.g., 01)
% D date; same as % m/% d/% Y
% E day of month, space padded; same as % _ d
% F full date; same as % Y-% m-% d
% G last two digits of year of ISO week number (see % G)
% G year of ISO week number (see % V); normally useful only with % v
% H same as % B
% H hour (00 .. 23)
% I hour (01 .. 12)
% J day of year (001. 366)
% K hour, space padded (0 .. 23); same as % _ H
% L hour, space padded (1 .. 12); same as % _ I
% M month (01 .. 12)
% M minute (00 .. 59)
% N a newline
% N nanoseconds (000000000 .. 999999999)
% P locale's equivalent of either am or PM; blank if not known
% P like % P, but lower case
% R locale's 12-hour clock time (e.g., 11:11:04)
% R 24-hour and minute; same as % H: % m
% S seconds since 1970-01-01 00:00:00 UTC
% S second (00 .. 60)
% T a tab
% T time; same as % H: % m: % s
% U day of week (1 .. 7); 1 is Monday
% U week number of year, with Sunday as first day of week (00 .. 53)
% V ISO week number, with Monday as first day of week (01 .. 53)
% W day of week (0 .. 6); 0 is Sunday
% W week number of year, with Monday as first day of week (00 .. 53)
% X locale's date representation (e.g., 12/31/99)
% X locale's time representation (e.g., 23:13:48)
% Y last two digits of year (00 .. 99)
% Y year
% Z + hhmm numeric Time Zone (e.g.,-0400)
%: Z + hh: Mm numeric Time Zone (e.g)
%: Z + hh: mm: SS numeric Time Zone (e.g.,-04:00:00)
%: Z numeric time zone with: To necessary precision (e.g.,-04, + 05:30)
% Z alphabetic Time Zone abbreviation (e.g., EDT) simple example:
Show Calendar command: CalCommand Format: Cal [[month] year] is as follows: calculator: exit from BC is the quit command. Note: There are two commands in the command line mode:
  • One is that the command will directly display the result and return to the command prompt, waiting for the next command. For example, the Cal command.
  • One is to enter the environment of the command, and the command will return to the command prompt only after the command is completed. For example, the BC command.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.