Linux Ascendency Trouble Tutorial For Beginners 31 - Cal Command
CAL(1) BSD General Commands Manual CAL(1) NAME cal, ncal — displays a calendar together with the appointment of Easter SYNOPSIS cal [-3hjy] [-A number] [-B number] [[month] year] cal [-3hj] [-A number] [-B number] -m calendar month [year] ncal [-3bhjJpwySM] [-A number] [-B number] [-s country_code] [[month] year] ncal [-3bhJeoSM] [-A number] [-B number] [year] ncal [-CN] [-H yyyy-mm-dd] [-d yyyy-mm] DESCRIPTION The cal utility displays a unproblematic calendar inward traditional format and ncal offers an alternative layout, to a greater extent than options together with the appointment of Easter. The novel format is a picayune cramped but it makes a yr fit on a 25x80 terminal. If arguments are non specified, the current calendar month is displayed. The options are equally follows: -h Turns off highlighting of today. -J Display Julian Calendar, if combined amongst the -o option, dis‐ play appointment of Orthodox Easter according to the Julian Calen‐ dar. -e Display appointment of Easter (for western churches). -j Display Julian days (days one-based, numbered from January 1). -m month Display the specified month. If calendar month is specified equally a dec‐ imal number, it may hold upwardly followed past times the missive of the alphabet ‘f’ or ‘p’ to betoken the next or preceding calendar month of that number, respectively. -o Display appointment of Orthodox Easter (Greek together with Russian Orthodox Churches). -p Print the province codes together with switching days from Julian to Gregorian Calendar equally they are assumed past times ncal. The country code equally determined from the local environs is marked with an asterisk. -s country_code Assume the switch from Julian to Gregorian Calendar at the appointment associated amongst the country_code. If non specified, ncal tries to approximate the switch appointment from the local environ‐ ment or falls dorsum to September 2, 1752. This was when Great U.K. together with her colonies switched to the Gregorian Calendar. -w Print the seat out of the calendar week below each calendar week column. -y Display a calendar for the specified year. This selection is implied when a yr but no calendar month are specified on the command line. -3 Display the previous, electrical flow together with adjacent calendar month surrounding today. -1 Display alone the electrical flow month. This is the default. -A number Months to add together after. The specified seat out of months is added to the terminate of the display. This is inward improver to whatever date attain selected past times the -y, -3, or -1 options. For example, “cal -y -B2 -A2” shows everything from Nov of the previ‐ ous yr to Feb of the next year. Negative numbers are allowed, inward which instance the specified seat out of months is subtracted. For example, “cal -y -B-6” shows July to Decem‐ ber. And “cal -A11” merely shows the adjacent 12 months. -B number Months to add together before. The specified seat out of months is added to the starting fourth dimension of the display. See -A for examples. -C Switch to cal mode. -N Switch to ncal mode. -d yyyy-mm Use yyyy-mm equally the electrical flow appointment (for debugging of appointment selec‐ tion). -H yyyy-mm-dd Use yyyy-mm-dd equally the electrical flow appointment (for debugging of high‐ lighting). -M Weeks start on Monday. -S Weeks start on Sunday. -b Use oldstyle format for ncal output. Influenza A virus subtype H5N1 unmarried parameter specifies the yr (1–9999) to hold upwardly displayed; note the yr must hold upwardly fully specified: “cal 89” volition non display a calen‐ dar for 1989. Two parameters announce the calendar month together with year; the calendar month is either a seat out betwixt 1 together with 12, or a total or abbreviated advert as specified past times the electrical flow locale. Month together with yr default to those of the electrical flow arrangement clock together with fourth dimension zone (so “cal -m 8” volition display a calendar for the calendar month of August inward the electrical flow year). Not all options tin hold upwardly used together. For example, the options -y, -3, together with -1 are mutually exclusive. If inconsistent options are given, the after ones own got precedence over the before ones. Influenza A virus subtype H5N1 yr starts on Jan 1. SEE ALSO calendar(3), strftime(3) HISTORY Influenza A virus subtype H5N1 cal ascendance appeared inward Version five AT&T UNIX. The ncal command appeared inward FreeBSD 2.2.6. The output of the cal ascendance is supposed to hold upwardly flake for flake compatible to the master Unix cal command, because its output is processed past times other programs similar CGI scripts, that should non hold upwardly broken. Therefore it volition ever output 8 lines, fifty-fifty if alone vii incorporate data. This extra blank business besides appears with the master cal command, at to the lowest degree on Solaris 8 AUTHORS The ncal ascendance together with manual were written past times Wolfgang Helbig <helbig@FreeBSD.org>. BUGS The assignment of Julian–Gregorian switching dates to province codes is historically naive for many countries. Not all options are compatible together with using them inward dissimilar orders volition plough over varying results. BSD March 14, 2009 BSD
Linux Ascendency Delineate Of Piece Of Occupation Tutorial For Beginners 36 - Tar Ascendency To Compress A...
TAR(1) BSD General Commands Manual TAR(1) NAME tar — The GNU version of the tar archiving utility SYNOPSIS tar [-] H5N1 --catenate --concatenate | c --create | d --diff --compare | --delete | r --append | t --list | --test-label | u --update | x --extract --get [options] [pathname ...] DESCRIPTION Tar stores in addition to extracts files from a tape or disk archive. The outset declaration to tar should endure a function; either 1 of the letters Acdrtux, or 1 of the long component names. H5N1 component alphabetic lineament demand not endure prefixed alongside ``-'', in addition to may endure combined alongside other single-letter options. H5N1 long component parent must endure prefixed alongside --. Some options bring a parameter; alongside the single-letter bird these must endure given every bit sep‐ arate arguments. With the long form, they may endure given past times appending =value to the option. FUNCTION LETTERS Main functioning mode: -A, --catenate, --concatenate append tar files to an archive -c, --create create a novel archive -d, --diff, --compare uncovering differences betwixt archive in addition to file system --delete delete from the archive (not on magazine tapes!) -r, --append append files to the halt of an archive -t, --list listing the contents of an archive --test-label exam the archive book label in addition to exit -u, --update entirely append files newer than re-create inwards archive -x, --extract, --get extract files from an archive OTHER OPTIONS Operation modifiers: -[0-7][lmh] specify displace in addition to density -a, --auto-compress utilization archive suffix to decide the compression program --acls Enable the POSIX ACLs support --no-acls Disable the POSIX ACLs support --add-file=FILE add together given FILE to the archive (useful if its parent starts alongside a dash) --anchored patterns check file parent start --no-anchored patterns check later on whatever '/' (default for exclusion) --atime-preserve save access times on dumped files, either past times restoring the times --no-auto-compress exercise non utilization archive suffix to decide the compression program -b, --blocking-factor BLOCKS BLOCKS x 512 bytes per record -B, --read-full-records reblock every bit nosotros read (for 4.2BSD pipes) --backup backup earlier removal, select version CONTROL -C, --directory DIR alter to directory DIR --check-device banking company check device numbers when creating incremental archives (default) --no-check-device exercise non banking company check device numbers when creating incremental archives --checkpoint display progress messages every NUMBERth tape (default 10) --checkpoint-action=ACTION execute ACTION on each checkpoint --delay-directory-restore delay setting modification times in addition to permissions of extracted --no-delay-directory-restore cancel the trial of --delay-directory-restore option --exclude=PATTERN exclude files, given every bit a PATTERN --exclude-backups exclude backup in addition to lock files --exclude-caches exclude contents of directories containing CACHEDIR.TAG, --exclude-caches-all exclude directories containing CACHEDIR.TAG --exclude-caches-under exclude everything nether directories containing CACHEDIR.TAG --exclude-tag=FILE exclude contents of directories containing FILE, except --exclude-tag-all=FILE exclude directories containing FILE --exclude-tag-under=FILE exclude everything nether directories containing FILE --exclude-vcs exclude version command organisation directories -f, --file ARCHIVE utilization archive file or device ARCHIVE -F, --info-script, --new-volume-script NAME run script at halt of each tape (implies -M) --force-local archive file is local fifty-fifty if it has a colon --full-time impress file fourth dimension to its sum resolution -g, --listed-incremental FILE grip novel GNU-format incremental backup -G, --incremental grip onetime GNU-format incremental backup --group=NAME forcefulness NAME every bit grouping for added files -h, --dereference follow symlinks; archive in addition to dump the files they quest to -H, --format FORMAT create archive of the given formatFORMAT is 1 of the following: --format=gnu GNU tar 1.13.x format --format=oldgnu GNU format every bit per tar <= 1.12 --format=pax POSIX 1003.1-2001 (pax) format --format=posix same every bit pax --format=ustar POSIX 1003.1-1988 (ustar) format --format=v7 onetime V7 tar format --hard-dereference follow difficult links; archive in addition to dump the files they refer to -i, --ignore-zeros ignore zeroed blocks inwards archive (means EOF) -I, --use-compress-program PROG filter through PROG (must bring -d) --ignore-case ignore case --no-ignore-case example sensitive matching (default) --ignore-command-error ignore leave of absence codes of children --no-ignore-command-error care for non-zero leave of absence codes of children every bit error --ignore-failed-read exercise non leave of absence alongside nonzero on unreadable files --index-file=FILE mail verbose output to FILE -j, --bzip2 -J, --xz -k, --keep-old-files don't supervene upon existing files when extracting, -K, --starting-file MEMBER-NAME start out at fellow member MEMBER-NAME when reading the archive --keep-directory-symlink save existing symlinks to directories when extracting --keep-newer-files don't supervene upon existing files that are newer than their archive copies -l, --check-links impress a message if non all links are dumped -L, --tape-length NUMBER alter tape later on writing NUMBER x 1024 bytes --level=NUMBER dump bird for created listed-incremental archive --lzip --lzma --lzop -m, --touch don't extract file modified time -M, --multi-volume create/list/extract multi-volume archive --mode=CHANGES forcefulness (symbolic) fashion CHANGES for added files --mtime=DATE-OR-FILE laid mtime for added files from DATE-OR-FILE -n, --seek archive is seekable -N, --newer, --after-date DATE-OR-FILE entirely shop files newer than DATE-OR-FILE --newer-mtime=DATE compare engagement in addition to fourth dimension when information changed only --null -T reads null-terminated names, disable -C --no-null disable the trial of the previous --null option --numeric-owner e'er utilization numbers for user/group names -O, --to-stdout extract files to measure output --occurrence procedure entirely the NUMBERth occurrence of each file inwards the archive; --old-archive, --portability same every bit --format=v7 --one-file-system remain inwards local file organisation when creating archive --overwrite overwrite existing files when extracting --overwrite-dir overwrite metadata of existing directories when extracting (default) --no-overwrite-dir save metadata of existing directories --owner=NAME forcefulness NAME every bit possessor for added files -p, --preserve-permissions, --same-permissions extract information almost file permissions (default for superuser) -P, --absolute-names don't strip leading '/'s from file names --pax-option=keyword[[:]=value][,keyword[[:]=value]]... command pax keywords --posix same every bit --format=posix --preserve same every bit both -p in addition to -s --quote-chars=STRING additionally quote characters from STRING --no-quote-chars=STRING disable quoting for characters from STRING --quoting-style=STYLE laid parent quoting style; encounter below for valid STYLE values -R, --block-number exhibit block position out inside archive alongside each message --record-size=NUMBER NUMBER of bytes per record, multiple of 512 --recursion recurse into directories (default) --no-recursion avoid descending automatically inwards directories --recursive-unlink empty hierarchies prior to extracting directory --remove-files withdraw files later on adding them to the archive --restrict disable utilization of around potentially harmful options --rmt-command=COMMAND utilization given rmt COMMAND instead of rmt --rsh-command=COMMAND utilization remote COMMAND instead of rsh -s, --preserve-order, --same-order fellow member arguments are listed inwards the same fellowship every bit the -S, --sparse grip lean files efficiently --same-owner attempt extracting files alongside the same ownership every bit exists inwards the ar‐ chive (default for superuser) --no-same-owner extract files every bit yourself (default for ordinary users) --no-same-permissions apply the user's umask when extracting permissions from the archive (default for ordinary users) --no-seek archive is non seekable --selinux Enable the SELinux context support --no-selinux Disable the SELinux context support --show-defaults exhibit tar defaults --show-omitted-dirs when listing or extracting, listing each directory that does non match search criteria --show-snapshot-field-ranges exhibit valid ranges for snapshot-file fields --show-transformed-names, --show-stored-names exhibit file or archive names later on transformation --skip-old-files don't supervene upon existing files when extracting, silently skip over them --sparse-version=MAJOR[.MINOR] laid version of the lean format to utilization (implies --sparse) --strip-components=NUMBER strip NUMBER leading components from file names on extraction --suffix=STRING backup earlier removal, override green suffix (' ' unless overridden past times environs variable SIMPLE_BACKUP_SUFFIX) -T, --files-from FILE perish names to extract or create from FILE --to-command=COMMAND piping extracted files to around other program --totals impress sum bytes later on processing the archive; --transform, --xform EXPRESSION utilization sed supervene upon EXPRESSION to transform file names -U, --unlink-first withdraw each file prior to extracting over it --unquote unquote filenames read alongside -T (default) --no-unquote exercise non unquote filenames read alongside -T --utc impress file modification times inwards UTC -v, --verbose verbosely listing files processed -V, --label TEXT create archive alongside book parent TEXT; at list/extract time, use TEXT every bit a globbing blueprint for book name --volno-file=FILE use/update the book position out inwards FILE -w, --interactive, --confirmation inquire for confirmation for every action -W, --verify endeavour to verify the archive later on writing it --warning=KEYWORD alert control --wildcards utilization wildcards (default for exclusion) --wildcards-match-slash wildcards check '/' (default for exclusion) --no-wildcards-match-slash wildcards exercise non check '/' --no-wildcards verbatim string matching -X, --exclude-from FILE exclude patterns listed inwards FILE --xattrs Enable extended attributes support --xattrs-exclude=MASK specify the exclude blueprint for xattr keys --xattrs-include=MASK specify the include blueprint for xattr keys --no-xattrs Disable extended attributes support -z, --gzip, --gunzip --ungzip -Z, --compress, --uncompress ENVIRONMENT The demeanour of tar is controlled past times the next environs variables, amid others: TAR_LONGLINK_100 PRISTINE_TAR_COMPAT SIMPLE_BACKUP_SUFFIX Backup prefix to utilization when extracting, if --suffix is non speci‐ fied. The backup suffix defaults to ` ' if neither is specified. TAR_OPTIONS Options to prepend to those specified on the command line, sepa‐ rated past times whitespace. Embedded backslashes may endure used to escape whitespace or backslashes inside an option. TAPE Device or file to utilization for the archive if --file is non specified. If this environs variable is unset, utilization stdin or stdout instead. EXAMPLES Create archive.tar from files foo in addition to bar. tar -cf archive.tar foo bar List all files inwards archive.tar verbosely. tar -tvf archive.tar Extract all files from archive.tar. tar -xf archive.tar SEE ALSO tar(5), symlink(7), rmt(8) HISTORY The tar command appeared inwards Version vii AT&T UNIX. BUGS The GNU folks, inwards general, loathe human pages, in addition to create information documents instead. Unfortunately, the information document describing tar is licensed nether the GFDL alongside invariant encompass texts, which makes it impossible to include whatever text from that document inwards this human page. Most of the text inwards this document was automatically extracted from the usage text inwards the source. It may non completely depict all features of the program. February 4, 2014
Linux Ascendance Business Tutorial For Beginners 37 - Grep Command
GREP(1) GREP(1) NAME grep, egrep, fgrep, zgrep, zegrep, zfgrep, bzgrep, bzegrep, bzfgrep - impress lines matching a pattern SYNOPSIS grep [options] PATTERN [FILE...] grep [options] [-e PATTERN | -f FILE] [FILE...] DESCRIPTION grep searches the named input FILEs (or measure input if no files are named, or the file cite - is given) for lines containing a jibe to the given PATTERN. By default, grep prints the matching lines. In addition, 2 variant programs egrep in addition to fgrep are available. egrep is the same equally grep -E. fgrep is the same equally grep -F. zgrep is the same equally grep -Z. zegrep is the same equally grep -EZ. zfgrep is the same equally grep -FZ. OPTIONS -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. Places a line of piece of job containing -- betwixt contiguous groups of matches. -a, --text Process a binary file equally if it were text; this is equivalent to the --binary-files=text option. -B NUM, --before-context=NUM Print NUM lines of leading context earlier matching lines. Places a line of piece of job containing -- betwixt contiguous groups of matches. -C NUM, --context=NUM Print NUM lines of output context. Places a line of piece of job containing -- betwixt contiguous groups of matches. -b, --byte-offset Print the byte offset within the input file earlier each line of piece of job of output. --binary-files=TYPE If the initiative of all few bytes of a file dot that the file contains binary data, assume that the file is of type TYPE. By default, TYPE is binary, in addition to grep commonly outputs either a one-line mes- sage maxim that a binary file matches, or no message if there is no match. If TYPE is without-match, grep assumes that a binary file does non match; this is equivalent to the -I option. If TYPE is text, grep processes a binary file equally if it were text; this is equivalent to the -a option. Warning: grep --binary-files=text mightiness output binary garbage, which tin have nasty side effects if the output is a terminal in addition to if the termi- nal driver interprets approximately of it equally commands. --colour[=WHEN], --color[=WHEN] Surround the matching string amongst the mark let on inwards GREP_COLOR surround variable. WHEN may live `never', `always', or `auto' -c, --count Suppress normal output; instead impress a count of matching lines for each input file. With the -v, --invert-match selection (see below), count non-matching lines. -D ACTION, --devices=ACTION If an input file is a device, FIFO or socket, utilization ACTION to procedure it. By default, ACTION is read, which agency that devices are read simply equally if they were ordinary files. If ACTION is skip, devices are silently skipped. -d ACTION, --directories=ACTION If an input file is a directory, utilization ACTION to procedure it. By default, ACTION is read, which agency that directories are read simply equally if they were ordinary files. If ACTION is skip, direc- tories are silently skipped. If ACTION is recurse, grep reads all files nether each directory, recursively; this is equivalent to the -r option. -E, --extended-regexp Interpret PATTERN equally an extended regular appear (see below). -e PATTERN, --regexp=PATTERN Use PATTERN equally the pattern; useful to protect patterns beginning amongst -. -F, --fixed-strings Interpret PATTERN equally a listing of fixed strings, separated past times new- lines, whatsoever of which is to live matched. -P, --perl-regexp Interpret PATTERN equally a Perl regular expression. This selection is non supported inwards FreeBSD. -f FILE, --file=FILE Obtain patterns from FILE, ane per line. The empty file con- tains null patterns, in addition to hence matches nothing. -G, --basic-regexp Interpret PATTERN equally a basic regular appear (see below). This is the default. -H, --with-filename Print the filename for each match. -h, --no-filename Suppress the prefixing of filenames on output when multiple files are searched. --help Output a brief assistance message. -I Process a binary file equally if it did non incorporate matching data; this is equivalent to the --binary-files=without-match option. -i, --ignore-case Ignore instance distinctions inwards both the PATTERN in addition to the input files. -L, --files-without-match Suppress normal output; instead impress the cite of each input file from which no output would commonly possess got been printed. The scanning volition halt on the initiative of all match. -l, --files-with-matches Suppress normal output; instead impress the cite of each input file from which output would commonly possess got been printed. The scanning volition halt on the initiative of all match. -m NUM, --max-count=NUM Stop reading a file after NUM matching lines. If the input is measure input from a regular file, in addition to NUM matching lines are output, grep ensures that the measure input is positioned to simply after the terminal matching line of piece of job earlier exiting, regardless of the presence of trailing context lines. This enables a calling procedure to resume a search. When grep stops after NUM matching lines, it outputs whatsoever trailing context lines. When the -c or --count selection is also used, grep does non output a count greater than NUM. When the -v or --invert-match selection is also used, grep stops after outputting NUM non-matching lines. --mmap If possible, utilization the mmap(2) organisation telephone telephone to read input, instead of the default read(2) organisation call. In approximately situations, --mmap yields ameliorate performance. However, --mmap tin effort undefined demeanour (including gist dumps) if an input file shrinks while grep is operating, or if an I/O fault occurs. -n, --line-number Prefix each line of piece of job of output amongst the line of piece of job seat out within its input file. -o, --only-matching Show exclusively the percentage of a matching line of piece of job that matches PATTERN. --label=LABEL Displays input genuinely coming from measure input equally input com- ing from file LABEL. This is peculiarly useful for tools like zgrep, e.g. gzip -cd foo.gz |grep --label=foo something --line-buffered Flush output on every line. Note that this incurs a performance penalty. -q, --quiet, --silent Quiet; practise non write anything to measure output. Exit immedi- ately amongst null condition if whatsoever jibe is found, fifty-fifty if an error was detected. Also come across the -s or --no-messages option. -R, -r, --recursive Read all files nether each directory, recursively; this is equiv- alent to the -d recurse option. --include=PATTERN Recurse inwards directories exclusively searching file matching PATTERN. --exclude=PATTERN Recurse inwards directories skip file matching PATTERN. -s, --no-messages Suppress fault messages most nonexistent or unreadable files. Portability note: dissimilar GNU grep, traditional grep did non con- shape to POSIX.2, because traditional grep lacked a -q selection and its -s selection behaved similar GNU grep's -q option. Shell scripts intended to live portable to traditional grep should avoid both -q in addition to -s in addition to should redirect output to /dev/null instead. -U, --binary Treat the file(s) equally binary. By default, nether MS-DOS in addition to MS- Windows, grep guesses the file type past times looking at the contents of the initiative of all 32KB read from the file. If grep decides the file is a text file, it strips the CR characters from the original file contents (to brand regular expressions amongst ^ in addition to $ work correctly). Specifying -U overrules this guesswork, causing all files to live read in addition to passed to the matching machinery verbatim; if the file is a text file amongst CR/LF pairs at the terminate of each line, this volition effort approximately regular expressions to fail. This selection has no outcome on platforms other than MS-DOS in addition to MS-Win- dows. -u, --unix-byte-offsets Report Unix-style byte offsets. This switch causes grep to written report byte offsets equally if the file were Unix-style text file, i.e. amongst CR characters stripped off. This volition make results identical to running grep on a Unix machine. This selection has no outcome unless -b selection is also used; it has no outcome on plat- forms other than MS-DOS in addition to MS-Windows. -V, --version Print the version seat out of grep to measure error. This ver- sion seat out should live included inwards all põrnikas reports (see below). -v, --invert-match Invert the feel of matching, to select non-matching lines. -w, --word-regexp Select exclusively those lines containing matches that shape whole words. The evidence is that the matching substring must either be at the starting fourth dimension of the line, or preceded past times a non-word con- stituent character. Similarly, it must live either at the terminate of the line of piece of job or followed past times a non-word element character. Word- element characters are letters, digits, in addition to the underscore. -x, --line-regexp Select exclusively those matches that precisely jibe the whole line. -y Obsolete synonym for -i. --null Output a null byte (the ASCII NUL character) instead of the grapheme that commonly follows a file name. For example, grep -l --null outputs a null byte after each file cite instead of the park newline. This selection makes the output unambiguous, fifty-fifty inwards the presence of file names containing odd characters similar newlines. This selection tin live used amongst commands similar find -print0, perl -0, form -z, in addition to xargs -0 to procedure arbitrary file names, fifty-fifty those that incorporate newline characters. -Z, --decompress Decompress the input information earlier searching. This selection is only available if compiled amongst zlib(3) library. -J, --bz2decompress Decompress the bzip2(1) compressed input information earlier searching. REGULAR EXPRESSIONS Influenza A virus subtype H5N1 regular appear is a designing that describes a laid of strings. Regular expressions are constructed analogously to arithmetics expres- sions, past times using diverse operators to combine smaller expressions. grep understands 2 different versions of regular appear syntax: "basic" in addition to "extended." In GNU grep, at that topographic point is no departure inwards avail- able functionality using either syntax. In other implementations, basic regular expressions are less powerful. The next description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards. The cardinal edifice blocks are the regular expressions that match a unmarried character. Most characters, including all letters in addition to digits, are regular expressions that jibe themselves. Any metacharacter with special pregnant may live quoted past times preceding it amongst a backslash. Influenza A virus subtype H5N1 bracket appear is a listing of characters enclosed past times [ in addition to ]. It matches whatsoever unmarried grapheme inwards that list; if the initiative of all grapheme of the listing is the caret ^ so it matches whatsoever grapheme non inwards the list. For example, the regular appear [0123456789] matches whatsoever single digit. Within a bracket expression, a attain appear consists of 2 charac- ters separated past times a hyphen. It matches whatsoever unmarried grapheme that sorts betwixt the 2 characters, inclusive, using the locale's collating sequence in addition to grapheme set. For example, inwards the default C locale, [a-d] is equivalent to [abcd]. Many locales form characters inwards dictio- nary order, in addition to inwards these locales [a-d] is typically non equivalent to [abcd]; it mightiness live equivalent to [aBbCcDd], for example. To obtain the traditional interpretation of bracket expressions, you lot tin utilization the C locale past times setting the LC_ALL surround variable to the value C. Finally, certainly named classes of characters are predefined within bracket expressions, equally follows. Their names are self explanatory, and they are [:alnum:], [:alpha:], [:blank:], [:cntrl:], [:digit:], [:graph:], [:lower:], [:print:], [:punct:], [:space:], [:upper:], and [:xdigit:]. For example, [[:alnum:]] agency [0-9A-Za-z], except the latter shape depends upon the C locale in addition to the ASCII grapheme encoding, whereas the quondam is independent of locale in addition to grapheme set. (Note that the brackets inwards these course of education names are percentage of the symbolic names, in addition to must live included inwards add-on to the brackets delimiting the bracket list.) Most metacharacters lose their special pregnant within lists. To include a literal ] house it initiative of all inwards the list. Similarly, to include a literal ^ house it anywhere but first. Finally, to include a literal - house it last. The menstruum . matches whatsoever unmarried character. The symbol \w is a synonym for [[:alnum:]] in addition to \W is a synonym for [^[:alnum:]]. The caret ^ in addition to the dollar sign $ are metacharacters that respectively jibe the empty string at the starting fourth dimension in addition to terminate of a line. The symbols \< in addition to \> respectively jibe the empty string at the starting fourth dimension in addition to end of a word. The symbol \b matches the empty string at the border of a word, in addition to \B matches the empty string provided it's non at the border of a word. Influenza A virus subtype H5N1 regular appear may live followed past times ane of several repetition oper- ators: ? The preceding detail is optional in addition to matched at most once. * The preceding detail volition live matched null or to a greater extent than times. + The preceding detail volition live matched ane or to a greater extent than times. {n} The preceding detail is matched precisely n times. {n,} The preceding detail is matched n or to a greater extent than times. {n,m} The preceding detail is matched at to the lowest degree n times, but non more than thousand times. Two regular expressions may live concatenated; the resulting regular appear matches whatsoever string formed past times concatenating 2 substrings that respectively jibe the concatenated subexpressions. Two regular expressions may live joined past times the infix operator |; the resulting regular appear matches whatsoever string matching either subex- pression. Repetition takes precedence over concatenation, which inwards plow takes precedence over alternation. Influenza A virus subtype H5N1 whole subexpression may live enclosed in parentheses to override these precedence rules. The backreference \n, where n is a unmarried digit, matches the substring previously matched past times the nth parenthesized subexpression of the regu- lar expression. In basic regular expressions the metacharacters ?, +, {, |, (, in addition to ) lose their special meaning; instead utilization the backslashed versions \?, \+, \{, \|, \(, in addition to \). Traditional egrep did non back upwards the { metacharacter, in addition to approximately egrep implementations back upwards \{ instead, so portable scripts should avoid { inwards egrep patterns in addition to should utilization [{] to jibe a literal {. GNU egrep attempts to back upwards traditional usage past times assuming that { is non special if it would live the start of an invalid interval specifica- tion. For example, the rhythm dominance egrep '{1' searches for the two- grapheme string {1 instead of reporting a syntax fault inwards the regular expression. POSIX.2 allows this demeanour equally an extension, but portable scripts should avoid it. ENVIRONMENT VARIABLES Grep's demeanour is affected past times the next surround variables. Influenza A virus subtype H5N1 locale LC_foo is specified past times examining the 3 surround vari- ables LC_ALL, LC_foo, LANG, inwards that order. The initiative of all of these vari- ables that is laid specifies the locale. For example, if LC_ALL is not set, but LC_MESSAGES is laid to pt_BR, so Brazilian Portuguese is used for the LC_MESSAGES locale. The C locale is used if none of these surround variables are set, or if the locale catalog is not installed, or if grep was non compiled amongst national linguistic communication support (NLS). GREP_OPTIONS This variable specifies default options to live placed inwards forepart of whatsoever explicit options. For example, if GREP_OPTIONS is '--binary-files=without-match --directories=skip', grep behaves equally if the 2 options --binary-files=without-match in addition to --direc- tories=skip had been specified earlier whatsoever explicit options. Option specifications are separated past times whitespace. Influenza A virus subtype H5N1 backslash escapes the adjacent character, so it tin live used to specify an selection containing whitespace or a backslash. GREP_COLOR Specifies the mark for highlighting. LC_ALL, LC_COLLATE, LANG These variables specify the LC_COLLATE locale, which determines the collating sequence used to translate attain expressions like [a-z]. LC_ALL, LC_CTYPE, LANG These variables specify the LC_CTYPE locale, which determines the type of characters, e.g., which characters are whitespace. LC_ALL, LC_MESSAGES, LANG These variables specify the LC_MESSAGES locale, which determines the linguistic communication that grep uses for messages. The default C locale uses American English linguistic communication messages. POSIXLY_CORRECT If set, grep behaves equally POSIX.2 requires; otherwise, grep behaves to a greater extent than similar other GNU programs. POSIX.2 requires that options that follow file names must live treated equally file names; by default, such options are permuted to the forepart of the operand listing in addition to are treated equally options. Also, POSIX.2 requires that unrecognized options live diagnosed equally "illegal", but since they are non genuinely against the police trace the default is to diagnose them equally "invalid". DIAGNOSTICS Normally, locomote out condition is 0 if selected lines are constitute in addition to 1 otherwise. But the locomote out condition is 2 if an fault occurred, unless the -q or --quiet or --silent selection is used in addition to a selected line of piece of job is found. BUGS Email põrnikas reports to bug-gnu-utils@gnu.org. Be certainly to include the give-and-take "grep" somewhere inwards the "Subject:" field. Large repetition counts inwards the {n,m} create may effort grep to use lots of memory. In addition, certainly other obscure regular expressions take away exponential fourth dimension in addition to space, in addition to may effort grep to run out of memory. Backreferences are really slow, in addition to may take away exponential time. GNU Project 2002/01/22 GREP(1)
Linux Ascendency Trace Of Piece Of Occupation Tutorial For Beginners 37 - Netstat Command
NETSTAT(8) Linux Programmer's Manual NETSTAT(8) NAME netstat - Print network connections, routing tables, interface statis‐ tics, masquerade connections, too multicast memberships SYNOPSIS netstat [address_family_options] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o] [--program|-p] [--verbose|-v] [--continuous|-c] netstat {--route|-r} [address_family_options] [--extend|-e[--extend|-e]] [--verbose|-v] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--continuous|-c] netstat {--interfaces|-i} [--all|-a] [--extend|-e[--extend|-e]] [--ver‐ bose|-v] [--program|-p] [--numeric|-n] [--numeric-hosts] [--numeric- ports] [--numeric-users] [--continuous|-c] netstat {--groups|-g} [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--continuous|-c] netstat {--masquerade|-M} [--extend|-e] [--numeric|-n] [--numeric-hosts] [--numeric-ports] [--numeric-users] [--continuous|-c] netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w] netstat {--version|-V} netstat {--help|-h} address_family_options: [-4] [-6] [--protocol={inet,unix,ipx,ax25,netrom,ddp}[,...]] [--unix|-x] [--inet|--ip] [--ax25] [--ipx] [--netrom] [--ddp] DESCRIPTION Netstat prints information almost the Linux networking subsystem. The type of information printed is controlled past times the get argument, as follows: (none) By default, netstat displays a listing of opened upward sockets. If yous don't specify whatever address families, too thence the active sockets of all configured address families volition last printed. --route , -r Display the inwardness routing tables. See the description inwards route(8) for details. netstat -r too road -e attain the same output. --groups , -g Display multicast grouping membership information for IPv4 too IPv6. --interfaces, -i Display a tabular array of all network interfaces. --masquerade , -M Display a listing of masqueraded connections. --statistics , -s Display summary statistics for each protocol. OPTIONS --verbose , -v Tell the user what is going on past times existence verbose. Especially impress some useful information almost unconfigured address families. --wide , -W Do non truncate IP addresses past times using output every bit broad every bit needed. This is optional for similar a shot to non interruption existing scripts. --numeric , -n Show numerical addresses instead of trying to create upward one's hear symbolic host, port or user names. --numeric-hosts shows numerical host addresses but does non impact the resolution of port or user names. --numeric-ports shows numerical port numbers but does non impact the resolution of host or user names. --numeric-users shows numerical user IDs but does non impact the resolution of host or port names. --protocol=family , -A Specifies the address families (perhaps amend described every bit depression level protocols) for which connections are to last shown. menage unit of measurement is a comma (',') separated listing of address menage unit of measurement keywords similar inet, unix, ipx, ax25, netrom, too ddp. This has the same upshot every bit using the --inet, --unix (-x), --ipx, --ax25, --netrom, too --ddp options. The address menage unit of measurement inet includes raw, udp too tcp protocol sockets. -c, --continuous This volition campaign netstat to impress the selected information every second continuously. -e, --extend Display additional information. Use this selection twice for maximum detail. -o, --timers Include information related to networking timers. -p, --program Show the PID too mention of the programme to which each socket belongs. -l, --listening Show solely listening sockets. (These are omitted past times default.) -a, --all Show both listening too non-listening sockets. With the --interfaces option, demo interfaces that are non up -F Print routing information from the FIB. (This is the default.) -C Print routing information from the road cache. OUTPUT Active Internet connections (TCP, UDP, raw) Proto The protocol (tcp, udp, raw) used past times the socket. Recv-Q The count of bytes non copied past times the user programme connected to this socket. Send-Q The count of bytes non acknowledged past times the remote host. Local Address Address too port discover of the local terminate of the socket. Unless the --numeric (-n) selection is specified, the socket address is resolved to its canonical host mention (FQDN), too the port discover is translated into the corresponding service name. Foreign Address Address too port discover of the remote terminate of the socket. Analogous to "Local Address." State The terra firma of the socket. Since at that spot are no states inwards raw agency too usu‐ ally no states used inwards UDP, this column may last left blank. Normally this tin last 1 of several values: ESTABLISHED The socket has an established connection. SYN_SENT The socket is actively attempting to flora a connection. SYN_RECV H5N1 connexion asking has been received from the network. FIN_WAIT1 The socket is closed, too the connexion is shutting down. FIN_WAIT2 Connection is closed, too the socket is waiting for a shutdown from the remote end. TIME_WAIT The socket is waiting later roughly have packets withal inwards the network. CLOSE The socket is non existence used. CLOSE_WAIT The remote terminate has unopen down, waiting for the socket to close. LAST_ACK The remote terminate has unopen down, too the socket is closed. Waiting for acknowledgement. LISTEN The socket is listening for incoming connections. Such sockets are non included inwards the output unless yous specify the --listen‐ ing (-l) or --all (-a) option. CLOSING Both sockets are unopen downwardly but nosotros withal don't accept all our data sent. UNKNOWN The terra firma of the socket is unknown. User The username or the user id (UID) of the possessor of the socket. PID/Program name Slash-separated dyad of the procedure id (PID) too procedure mention of the procedure that owns the socket. --program causes this column to be included. You volition also involve superuser privileges to meet this informa‐ tion on sockets yous don't own. This identification information is not yet available for IPX sockets. Timer (this needs to last written) Active UNIX domain Sockets Proto The protocol (usually unix) used past times the socket. RefCnt The reference count (i.e. attached processes via this socket). Flags The flags displayed is SO_ACCEPTON (displayed every bit ACC), SO_WAITDATA (W) or SO_NOSPACE (N). SO_ACCECPTON is used on unconnected sockets if their corresponding processes are waiting for a connect request. The other flags are non of normal interest. Type There are several types of socket access: SOCK_DGRAM The socket is used inwards Datagram (connectionless) mode. SOCK_STREAM This is a current (connection) socket. SOCK_RAW The socket is used every bit a raw socket. SOCK_RDM This 1 serves reliably-delivered messages. SOCK_SEQPACKET This is a sequential packet socket. SOCK_PACKET Raw interface access socket. UNKNOWN Who always knows what the futurity volition choose us - simply fill upward inwards here :-) State This champaign volition incorporate 1 of the next Keywords: FREE The socket is non allocated LISTENING The socket is listening for a connexion request. Such sockets are solely included inwards the output if yous specify the --listening (-l) or --all (-a) option. CONNECTING The socket is almost to flora a connection. CONNECTED The socket is connected. DISCONNECTING The socket is disconnecting. (empty) The socket is non connected to some other one. UNKNOWN This terra firma should never happen. PID/Program name Process ID (PID) too procedure mention of the procedure that has the socket open. More information available inwards Active Internet connections department writ‐ 10 above. Path This is the path mention every bit which the corresponding processes attached to the socket. Active IPX sockets (this needs to last done past times soul who knows it) Active NET/ROM sockets (this needs to last done past times soul who knows it) Active AX.25 sockets (this needs to last done past times soul who knows it) NOTES Starting amongst Linux liberate 2.2 netstat -i does non demo interface sta‐ tistics for alias interfaces. To larn per alias interface counters you involve to setup explicit rules using the ipchains(8) command. FILES /etc/services -- The services translation file /proc -- Mount indicate for the proc filesystem, which gives access to inwardness condition information via the next files. /proc/net/dev -- device information /proc/net/raw -- raw socket information /proc/net/tcp -- TCP socket information /proc/net/udp -- UDP socket information /proc/net/igmp -- IGMP multicast information /proc/net/unix -- Unix domain socket information /proc/net/ipx -- IPX socket information /proc/net/ax25 -- AX25 socket information /proc/net/appletalk -- DDP (appletalk) socket information /proc/net/nr -- NET/ROM socket information /proc/net/route -- IP routing information /proc/net/ax25_route -- AX25 routing information /proc/net/ipx_route -- IPX routing information /proc/net/nr_nodes -- NET/ROM nodelist /proc/net/nr_neigh -- NET/ROM neighbours /proc/net/ip_masquerade -- masqueraded connections /proc/net/snmp -- statistics SEE ALSO route(8), ifconfig(8), ipchains(8), iptables(8), proc(5) BUGS Occasionally foreign information may look if a socket changes every bit it is viewed. This is unlikely to occur. AUTHORS The netstat user interface was written past times Fred Baumgarten <dc6iq@insu1.etec.uni-karlsruhe.de>, the human being page basically past times Matt Welsh <mdw@tc.cornell.edu>. It was updated past times Alan Cox <Alan.Cox@linux.org> but could attain amongst a flake to a greater extent than work. It was updated in 1 lawsuit again past times Tuan Hoang <tqhoang@bigfoot.com>. The human being page too the command included inwards the net-tools bundle is totally rewritten past times Bernd Eckenfels <ecki@linux.de>. net-tools 2008-11-16 NETSTAT(8)
Node.Js Tutorial For Beginners Twenty - Introduction To Express.Js
npm init command
$ npm init This utility volition walk you lot through creating a package.json file. Press ^C at whatsoever fourth dimension to quit. name: (express_test) demo version: (1.0.0) description: Demo of package.json entry point: (index.js) test command: git repository: keywords: author: license: (ISC)
install limited via npm
npm install limited --save
index.js
var limited = require('express'); var app = express(); // GET // POST // PUT // DELETE app.get('/', function(req, rep) { rep.send('this is dwelling page'); }) app.get('/about', function(req, rep) { rep.send('this is close page'); }) app.get('/contect', function(req, rep) { rep.send('this is contect page'); }) app.listen(3000, function() { console.log('our server is alive on posrt 3000'); })
package.json
{ "name": "express_test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no exam specified\" && popular off 1" }, "author": "", "license": "ISC", "dependencies": { "express": "^4.14.1" } }