0% found this document useful (0 votes)
66 views

Ls - List Directory Contents

The document contains summaries of several Linux commands: 1) It provides summaries of the ls, cp, mv, rm, vim, touch, chmod, mount, last, shutdown, halt, reboot, passwd, and tar commands, outlining their purpose, syntax, and key options. 2) The summaries describe what each command is used for, such as listing directory contents (ls), copying files (cp), renaming files (mv), removing files or directories (rm), editing text (vim), changing file timestamps (touch), changing file permissions (chmod), mounting file systems (mount), showing last logged in users (last), shutting down the system securely (shutdown), stopping the system (halt, reboot,
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Ls - List Directory Contents

The document contains summaries of several Linux commands: 1) It provides summaries of the ls, cp, mv, rm, vim, touch, chmod, mount, last, shutdown, halt, reboot, passwd, and tar commands, outlining their purpose, syntax, and key options. 2) The summaries describe what each command is used for, such as listing directory contents (ls), copying files (cp), renaming files (mv), removing files or directories (rm), editing text (vim), changing file timestamps (touch), changing file permissions (chmod), mounting file systems (mount), showing last logged in users (last), shutting down the system securely (shutdown), stopping the system (halt, reboot,
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 10

1) NAME : ls

ls - list directory contents

SYNOPSIS
ls [OPTION]... [FILE]...

DESCRIPTION
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuSUX nor --sort.

Mandatory arguments to long options are mandatory for short options


too.

-a, --all
do not hide entries starting with .

-A, --almost-all
do not list implied . and ..

--author
print the author of each file
:

) User Commands CP(1)

NAME
cp - copy files and directories

SYNOPSIS
cp [OPTION]... SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... --target-directory=DIRECTORY SOURCE...

DESCRIPTION
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

Mandatory arguments to long options are mandatory for short options


too.

-a, --archive
same as -dpR

--backup[=CONTROL]
make a backup of each existing destination file

-b like --backup but does not accept an argument


:
NAME
mv - move (rename) files
SYNOPSIS
mv [OPTION]... SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... --target-directory=DIRECTORY SOURCE...

DESCRIPTION
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

Mandatory arguments to long options are mandatory for short options


too.

--backup[=CONTROL]
make a backup of each existing destination file

-b like --backup but does not accept an argument

-f, --force
do not prompt before overwriting (equivalent to --reply=yes)
:------------------------------------
NAME
rm - remove files or directories

SYNOPSIS
rm [OPTION]... FILE...

DESCRIPTION
This manual page documents the GNU version of rm. rm removes each
specified file. By default, it does not remove directories.

If a file is unwritable, the standard input is a tty, and the -f or


--force option is not given, rm prompts the user for whether to remove
the file. If the response does not begin with ‘y’ or ‘Y’, the file is
skipped.

OPTIONS
Remove (unlink) the FILE(s).

-d, --directory
unlink FILE, even if it is a non-empty directory (super-user
only; this works only if your system
:NAME
vim - Vi IMproved, a programmers text editor

SYNOPSIS
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]

ex
view
gvim gview evim eview
rvim rview rgvim rgview

DESCRIPTION
Vim is a text editor that is upwards compatible to Vi. It can be used
to edit all kinds of plain text. It is especially useful for editing
programs.

There are a lot of enhancements above Vi: multi level undo, multi win-
dows and buffers, syntax highlighting, command line editing, filename
:

NAME
touch - change file timestamps

SYNOPSIS
touch [OPTION]... FILE...

DESCRIPTION
Update the access and modification times of each FILE to the current
time.

Mandatory arguments to long options are mandatory for short options


too.

-a change only the access time

-c, --no-create
do not create any files

-d, --date=STRING
parse STRING and use it instead of current time

NAME
chmod - change file access permissions

SYNOPSIS
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...

DESCRIPTION
This manual page documents the GNU version of chmod. chmod changes the
permissions of each given file according to mode, which can be either a
symbolic representation of changes to make, or an octal number repre-
senting the bit pattern for the new permissions.
The format of a symbolic mode is ‘[ugoa...][[+-=][rwxXs-
tugo...]...][,...]’. Multiple symbolic operations can be given, sepa-
rated by commas.

A combination of the letters ‘ugoa’ controls which users’ access to the


file will be changed: the user who owns it (u), other users in the
file’s group (g), other users not in the file’s group (o), or all users
:
CONFIG(5) OpenSSL CONFIG(5)

NAME
config - OpenSSL CONF library configuration files

DESCRIPTION
The OpenSSL CONF library can be used to read configuration files. It
is used for the OpenSSL master configuration file openssl.cnf and in a
few other places like SPKAC files and certificate extension files for
the x509 utility. OpenSSL applications can also use the CONF library
for their own purposes.

A configuration file is divided into a number of sections. Each section


starts with a line [ section_name ] and ends when a new section is
started or end of file is reached. A section name can consist of
alphanumeric characters and underscores.

The first section of a configuration file is special and is referred to


as the default section this is usually unnamed and is from the start of
file until the first named section. When a name is being looked up it
is first looked up in a named section (if any) and then the default
section.

:
NAME
mount - mount a file system

SYNOPSIS
mount [-lhV]

mount -a [-fFnrsvw] [-t vfstype] [-O optlist]


mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir

DESCRIPTION
All files accessible in a Unix system are arranged in one big tree, the
file hierarchy, rooted at /. These files can be spread out over sev-
eral devices. The mount command serves to attach the file system found
on some device to the big file tree. Conversely, the umount(8) command
will detach it again.

The standard form of the mount command, is


mount -t type device dir
This tells the kernel to attach the file system found on device (which
is of type type) at the directory dir. The previous contents (if any)
:
NAME
last, lastb - show listing of last logged in users

SYNOPSIS
last [-R] [-num] [ -n num ] [-adiox] [ -f file ] [ -t YYYYMMDDHHMMSS ]
[name...] [tty...]
lastb [-R] [-num] [ -n num ] [ -f file ] [ -t YYYYMMDDHHMMSS ] [-adiox]
[name...] [tty...]

DESCRIPTION
Last searches back through the file /var/log/wtmp (or the file desig-
nated by the -f flag) and displays a list of all users logged in (and
out) since that file was created. Names of users and tty’s can be
given, in which case last will show only those entries matching the
arguments. Names of ttys can be abbreviated, thus last 0 is the same
as last tty0.

When last catches a SIGINT signal (generated by the interrupt key, usu-
ally control-C) or a SIGQUIT signal (generated by the quit key, usually
control-\), last will show how far it has searched through the file; in
the case of the SIGINT signal last will then terminate.
:

NAME
shutdown - bring the system down

SYNOPSIS
/sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]

DESCRIPTION
shutdown brings the system down in a secure way. All logged-in users
are notified that the system is going down, and login(1) is blocked.
It is possible to shut the system down immediately or after a specified
delay. All processes are first notified that the system is going down
by the signal SIGTERM. This gives programs like vi(1) the time to save
the file being edited, mail and news processing programs a chance to
exit cleanly, etc. shutdown does its job by signalling the init pro-
cess, asking it to change the runlevel. Runlevel 0 is used to halt the
system, runlevel 6 is used to reboot the system, and runlevel 1 is used
to put to system into a state where administrative tasks can be per-
formed; this is the default if neither the -h or -r flag is given to
shutdown. To see which actions are taken on halt or reboot see the
appropriate entries for these runlevels in the file /etc/inittab.

:
NAME
halt, reboot, poweroff - stop the system.

SYNOPSIS
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]

DESCRIPTION
Halt notes that the system is being brought down in the file
/var/log/wtmp, and then either tells the kernel to halt, reboot or
poweroff the system.

If halt or reboot is called when the system is not in runlevel 0 or 6,


in other words when it’s running normally, shutdown will be invoked
instead (with the -h or -r flag). For more info see the shutdown(8)
manpage.

The rest of this manpage describes the behaviour in runlevels 0 and 6,


that is when the systems shutdown scripts are being run.

:
NAME
passwd - update a user’s authentication tokens(s)

SYNOPSIS
passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warndays]
[-i inactivedays] [-S] [--stdin] [username]

DESCRIPTION
Passwd is used to update a user’s authentication token(s).

Passwd is configured to work through the Linux-PAM API. Essentially,


it initializes itself as a "passwd" service with Linux-PAM and utilizes
configured password modules to authenticate and then update a user’s
password.

A simple entry in the Linux-PAM configuration file for this service


would be:

#
# passwd service entry that does strength checking of
# a proposed password before updating it.
:
R(1) TAR(1)

NAME
tar - The GNU version of the tar archiving utility

SYNOPSIS
tar [ - ] A --catenate --concatenate | c --create | d --diff --compare
| r --append | t --list | u --update | x -extract --get [ --atime-pre-
serve ] [ -b, --block-size N ] [ -B, --read-full-blocks ] [ -C,
--directory DIR ] [ --checkpoint ] [ -f, --file [HOSTNAME:]F ] [
--force-local ] [ -F, --info-script F --new-volume-script F ] [ -G,
--incremental ] [ -g, --listed-incremental F ] [ -h, --dereference ] [
-i, --ignore-zeros ] [ -j, -I, --bzip ] [ --ignore-failed-read ] [ -k,
--keep-old-files ] [ -K, --starting-file F ] [ -l, --one-file-system ]
[ -L, --tape-length N ] [ -m, --modification-time ] [ -M, --multi-vol-
ume ] [ -N, --after-date DATE, --newer DATE ] [ -o, --old-archive,
--portability ] [ -O, --to-stdout ] [ -p, --same-permissions, --pre-
serve-permissions ] [ -P, --absolute-paths ] [ --preserve ] [ -R,
--record-number ] [ --remove-files ] [ -s, --same-order, --preserve-
order ] [ --same-owner ] [ -S, --sparse ] [ -T, --files-from=F ] [
--null ] [ --totals ] [ -v, --verbose ] [ -V, --label NAME ] [
--version ] [ -w, --interactive, --confirmation ] [ -W, --verify ]
[ --exclude FILE ] [ -X, --exclude-from FILE ] [ -Z, --compress,
:
NAME
grep, egrep, fgrep - print lines matching a pattern

SYNOPSIS
grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]

DESCRIPTION
Grep searches the named input FILEs (or standard input if no files are
named, or the file name - is given) for lines containing a match to the
given PATTERN. By default, grep prints the matching lines.

In addition, two variant programs egrep and fgrep are available. Egrep
is the same as grep -E. Fgrep is the same as grep -F.

OPTIONS
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines.
Places a line containing -- between contiguous groups of
matches.

:
NAME
bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen,
complete, continue, declare, dirs, disown, echo, enable, eval, exec,
exit, export, fc, fg, getopts, hash, help, history, jobs, kill, let,
local, logout, popd, printf, pushd, pwd, read, readonly, return, set,
shift, shopt, source, suspend, test, times, trap, type, typeset,
ulimit, umask, unalias, unset, wait - bash built-in commands, see
bash(1)

BASH BUILTIN COMMANDS


Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by - accepts -- to signify the end of the
options.
: [arguments]
No effect; the command does nothing beyond expanding arguments
and performing any specified redirections. A zero exit code is
returned.

. filename [arguments]
source filename [arguments]
Read and execute commands from filename in the current shell
:
BSD General Commands Manual MORE(1)

NAME
more - file perusal filter for crt viewing

SYNOPSIS
more [-dlfpcsu] [-num] [+/ pattern] [+ linenum] [file ...]

DESCRIPTION
More is a filter for paging through text one screenful at a time. This
version is especially primitve. Users should realize that less(1) pro-
vides more(1) emulation and extensive enhancements.

OPTIONS
Command line options are described below. Options are also taken from
the environment variable MORE (make sure to precede them with a dash
(‘‘-’’)) but command line options will override them.

-num This option specifies an integer which is the screen size (in
lines).

-d more will prompt the user with the message "[Press space to con-
tinue, ’q’ to quit.]" and will display "[Press ’h’ for instruc-
:
BSD General Commands Manual SCP(1)

NAME
scp - secure copy (remote file copy program)

SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2

DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data
transfer, and uses the same authentication and provides the same security
as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if
they are needed for authentication.

Any file name may contain a host and user specification to indicate that
the file is to be copied to/from that host. Copies between two remote
hosts are permitted.

The options are as follows:

-1 Forces scp to use protocol 1.


:
NAME
scp - secure copy (remote file copy program)

SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2

DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data
transfer, and uses the same authentication and provides the same security
as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if
they are needed for authentication.

Any file name may contain a host and user specification to indicate that
the file is to be copied to/from that host. Copies between two remote
hosts are permitted.

The options are as follows:

-1 Forces scp to use protocol 1.


NAME
ssh - OpenSSH SSH client (remote login program)

SYNOPSIS
ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L
[bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port] [-R
[bind_address:]port:host:hostport] [-S ctl_path] [user@]hostname
[command]

DESCRIPTION
ssh (SSH client) is a program for logging into a remote machine and for
executing commands on a remote machine. It is intended to replace rlogin
and rsh, and provide secure encrypted communications between two
untrusted hosts over an insecure network. X11 connections and arbitrary
TCP/IP ports can also be forwarded over the secure channel.

ssh connects and logs into the specified hostname (with optional user
name). The user must prove his/her identity to the remote machine using
one of several methods depending on the protocol version used.
:
NAME
uptime - Tell how long the system has been running.

SYNOPSIS
uptime
uptime [-V]

DESCRIPTION
uptime gives a one line display of the following information. The cur-
rent time, how long the system has been running, how many users are
currently logged on, and the system load averages for the past 1, 5,
and 15 minutes.

This is the same information contained in the header line displayed by


w(1).

FILES
/var/run/utmp information about who is currently logged on
/proc process information

AUTHORS
:
NAME
acl - Access Control Lists

DESCRIPTION
This manual page describes POSIX Access Control Lists, which are used to
define more fine-grained discretionary access rights for files and direc-
tories.

ACL TYPES
Every object can be thought of as having associated with it an ACL that
governs the discretionary access to that object; this ACL is referred to
as an access ACL. In addition, a directory may have an associated ACL
that governs the initial access ACL for objects created within that
directory; this ACL is referred to as a default ACL.

ACL ENTRIES
An ACL consists of a set of ACL entries. An ACL entry specifies the
access permissions on the associated object for an individual user or a
group of users as a combination of read, write and search/execute permis-
sions.

You might also like