Dhruv Pandit: Name: Class:Cba Enrolment No: Batch: Cse - 21
Dhruv Pandit: Name: Class:Cba Enrolment No: Batch: Cse - 21
CLASS :CBA
ENROLMENT NO :16012101007
BATCH : CSE - 21
PRACTICAL 2:
1. Ls: list directory contents
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . And ..
2.cat
concatenate files and print on the standard output
Concatenate FILE(s), or standard input, to standard output.
-A, --show-all
equivalent to -vET
-b, --number-nonblank
number nonempty output lines, overrides -n
3.mkdir
Create the DIRECTORY(ies), if they do not already exist.
-m, --mode=MODE
set file mode (as in chmod), not a=rwx - umask
-p, --parents
no error if existing, make parent directories as needed
--ignore-fail-on-non-empty
is non-empty
-p, --parents
remove DIRECTORY and its ancestors; e.g., 'rmdir -p a/b/c' is
similar to 'rmdir a/b/c a/b a'
5.history
Many programs read input from the user a line at a time. The GNU His
tory library is able to keep track of those lines, associate arbitrary
data with each line, and utilize information from previous lines in
composing new ones.
Syntax:
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...
-c, --changes
like verbose but report only when a change is made
-c, --no-create
do not create any files
Syntax:
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t DIRECTORY SOURCE...
-f, --force
do not prompt before overwriting
Syntax:
link FILE1 FILE2
link OPTION
--version
output version information and exit
grep searches the named input FILEs (or standard input if no files are
named, or if a single hyphen-minus (-) is given as file name) for
lines containing a match to the given PATTERN. By default, grep
prints the matching lines.
Syntax:
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
-E, --extended-regexp
Interpret PATTERN as an extended regular expression (ERE, see
below). (-E is specified by POSIX.)
-F, --fixed-strings
Interpret PATTERN as a list of fixed strings, separated by
newlines, any of which is to be matched. (-F is specified by
POSIX.)
11. wc - print newline, word, and byte counts for each file
Print newline, word, and byte counts for each FILE, and a total line
if more than one FILE is specified. With no FILE, or when FILE is -,
read standard input. A word is a non-zero-length sequence of charac
ters delimited by white space. The options below may be used to
select which counts are printed, always in the following order: new
line, word, character, byte, maximum line length.
Syntax:
wc [OPTION]... [FILE]...
wc [OPTION]... --files0-from=F
-c, --bytes
print the byte counts
-m, --chars
print the character counts
Syntax:
echo [SHORT-OPTION]... [STRING]...
echo LONG-OPTION
This manual page documents the GNU version of rm. rm removes each
specified file. By default, it does not remove directories.
Syntax:
rm [OPTION]... FILE...
-f, --force
ignore nonexistent files and arguments, never prompt
-i prompt before every removal
Syntax:
cal [-3hjy] [-A number] [-B number] [[month] year]
cal [-3hj] [-A number] [-B number] -m 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]
Syntax:
info [OPTION]... [MENU-ITEM...]
-a, --all
use all matching manuals.
-k, --apropos=STRING
look up STRING in all indices of all manuals.
Syntax:
pwd [OPTION]...
-L, --logical
use PWD from environment, even if it contains symlinks
-P, --physical
avoid all symlinks
Syntax:
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...
-a, --archive
same as -dR --preserve=all
--attributes-only
don't copy the file data, just the attributes
Syntax:
paste [OPTION]... [FILE]...
-d, --delimiters=LIST
reuse characters from LIST instead of TABs
-s, --serial
paste one file at a time instead of in parallel
-b, --ignore-leading-blanks
ignore leading blanks
-d, --dictionary-order
consider only blanks and alphanumeric characters
Syntax:
#include <stdlib.h>
The optional SKIP1 and SKIP2 specify the number of bytes to skip at the
beginning of each file (zero by default).
Syntax:
cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]
-b, --print-bytes
print differing bytes
-i, --ignore-initial=SKIP
skip first SKIP bytes of both inputs
Syntax:
diff [OPTION]... FILES
--normal
output a normal diff (the default)
-q, --brief
report only when files differ
24.locate - find files by name
By default, locate does not check whether files found in database still
exist (but it does require all parent directories to exist if the data
base was built with --require-visibility no). locate can never report
files created after the most recent update of the relevant database.
Syntax:
locate [OPTION]... PATTERN...
-A, --all
Print only entries that match all PATTERNs instead of requiring
only one of them to match.
-b, --basename
Match only the base name against the specified patterns. This
is the opposite of wholename.
Print the first 10 lines of each FILE to standard output. With more
than one FILE, precede each with a header giving the file name. With
no FILE, or when FILE is -, read standard input.
Syntax:
head [OPTION]... [FILE]...
-c, --bytes=[-]K
print the first K bytes of each file; with the leading '-',
print all but the last K bytes of each file
-n, --lines=[-]K
print the first K lines instead of the first 10; with the lead
ing '-', print all but the last K lines of each file
Print the last 10 lines of each FILE to standard output. With more
than one FILE, precede each with a header giving the file name. With
no FILE, or when FILE is -, read standard input.
Syntax:
tail [OPTION]... [FILE]...
-c, --bytes=K
output the last K bytes; alternatively, use -c +K to output
bytes starting with the Kth of each file
-f, --follow[={name|descriptor}]
output appended data as the file grows; -f, --follow, and --fol
low=descriptor are equivalent
27. find - search for files in a directory hierarchy
This manual page documents the GNU version of find. GNU find searches
the directory tree rooted at each given file name by evaluating the
given expression from left to right, according to the rules of prece
dence (see section OPERATORS), until the outcome is known (the left
hand side is false for and operations, true for or), at which point
find moves on to the next file name.
Syntax:
find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]
Syntax:
tr [OPTION]... SET1 [SET2]
-c, -C, --complement
use the complement of SET1
-d, --delete
delete characters in SET1, do not translate
Write each FILE to standard output, with line numbers added. With no
FILE, or when FILE is -, read standard input.
Syntax:
nl [OPTION]... [FILE]...
-b, --body-numbering=STYLE
use STYLE for numbering body lines
-d, --section-delimiter=CC
use CC for separating logical pages
man is the system's manual pager. Each page argument given to man is
normally the name of a program, utility or function. The manual page
associated with each of these arguments is then found and displayed. A
section, if provided, will direct man to look only in that section of
the manual. The default action is to search in all of the available
sections following a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl 5
4 9 6 7" by default, unless overridden by the SECTION directive in
/etc/manpath.config), and to show only the first page found, even if
page exists in several sections.
Syntax:
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L
locale] [-m system[,...]] [-M path] [-S list] [-e extension] [-i|-I]
[--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P
pager] [-r prompt] [-7] [-E encoding] [--no-hyphenation] [--no-justifi
cation] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z]
[[section] page ...] ...
man -k [apropos options] regexp ...
man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
man -f [whatis options] page ...
man -l [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L
locale] [-P pager] [-r prompt] [-7] [-E encoding] [-p string] [-t]
[-T[device]] [-H[browser]] [-X[dpi]] [-Z] file ...
man -w|-W [-C file] [-d] [-D] page ...
man -c [-C file] [-d] [-D] page ...
man [-?V]