CATEGORII DOCUMENTE |
Asp | Autocad | C | Dot net | Excel | Fox pro | Html | Java |
Linux | Mathcad | Photoshop | Php | Sql | Visual studio | Windows | Xml |
date |
date [options] [+format] [date] Print the current date and time. You may specify a display format. format can consist of literal text strings (blanks must be quoted) as well as field descriptors, whose values will appear as described in the following entries (the listing shows some logical groupings). A privileged user can change the system's date and time. Optionsformat Display current date in a nonstandard format. For example: % date +'%A %j %n%k %p'Tuesday 248 15 PM The default is %a %b %e %T %Z %Y -- e.g., Tue Sep 5 14:59:37 EDT 2000. -d date, --date date Display date, which should be in quotes and may be in the format d days or m months d days to print a date in the future. Specify ago to print a date in the past. You may include formatting (see the 'Format' section that follows). -f datefile, --file=datefile Like -d but printed once for each line of datefile. -I [timespec], --iso-8601[=timespec Display in ISO-8601 format. If specified, timespec can have one of the values date (for date only), hours, minutes, or seconds to get the indicated precision. -r file, --reference=file Display the time file was last modified. -R, --rfc-822 Display the date in RFC 822 format. --help Print help message and exit. --version Print version information and exit. -s date, --set date Set the date. -u, --universal Set the date to Greenwich Mean Time, not local time. FormatLiteral %. Do not pad fields (default: pad fields with zeros). Pad fields with space (default: zeros). %a Abbreviated weekday. %b Abbreviated month name. %c Country-specific date and time format. %d Day of month (01-31). %h Same as %b. %j Julian day of year (001-366). %k Hour in 24-hour format, without leading zeros (0-23). %l Hour in 12-hour format, without leading zeros (1-12). %m Month of year (01-12). %n Insert a new line. %p String to indicate AM or PM. %r Time in %I:%M:%S %p (12-hour) format. %s Seconds since 'The Epoch,' 1970-01-01 00:00:00 UTC (a nonstandard extension). %t Insert a tab. %w Day of week (Sunday = 0). %x Country-specific date format. %y Last two digits of year (00-99). %z RFC 822-style numeric time zone. %A Full weekday. %B Full month name. %D Date in %m/%d/%y format. %H Hour in 24-hour format (00-23). %I Hour in 12-hour format (01-12). %M Minutes (00-59). %S Seconds (00-59). %T Time in %H:%M:%S format. %U Week number in year (00-53); start week on Sunday. %V Week number in year (01-52); start week on Monday. %W Week number in year (00-53); start week on Monday. %X Country-specific time format. %Y Four-digit year (e.g., 1996). %Z Time zone name. Strings for setting dateStrings for setting the date may be numeric or nonnumeric. Numeric strings consist of time, day, and year in the format MMDDhhmm[[CC]YY][.ss]. Nonnumeric strings may include month strings, time zones, a.m., and p.m. time A two-digit hour and two-digit minute (hhmm); hh uses 24-hour format. day A two-digit month and two-digit day of month (MMDD); default is current day and month. year The year specified as either the full four-digit century and year or just the two-digit year; the default is the current year. ExamplesSet the date to July 1 (0701), 4 a.m. (0400), 1995 (95): date 0701040095The command: date +'Hello%t Date is %D %n%t Time is %T'produces a formatted date as follows: Hello Date is 05/09/93 Time is 17:53:39 |
Politica de confidentialitate | Termeni si conditii de utilizare |
Vizualizari: 637
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved