Linux_commands

Post on 17-May-2015

218 views 3 download

Tags:

transcript

X

Usefull Commands for Usefull Commands for RedhatRedhat

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Presented ByTEJVEER SINGH

ID:VGT136T

X

IntrductionIntrduction

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

The Linux Directory LayoutFile/Directory BasicsFile ViewingFile PropertiesFile CompressionFile ComparisonFile Text ManipulationDisks and File SystemsFile LocationBackups and Remote StorageAudio and VideoHostsSpelling OperationsNetworkingPrinting

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Directory Description

/bin Essential command binaries (programs)are stored here(bash, ls, mount,tetc.)

/boot Static files of the boot loader.

/dev Device files. In Linux, hardware devices are acceessd just like other files, andthey are kept under this

directory.

/etc Host-specific system configuration files.

/home Location of users' personal home directories (e.g. /home/Raj).

/lib Essential shared libraries and kernel modules.

The Linux Directory Layout

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Directory Description/proc Process information pseudo-filesystem. An interface

to kernel data structures.

/root The root (superuser) home directory.

/sbin Essential system binaries (fdisk, fsck, init, etc).

/tmp Temporary files. All users have permission to place temporary files here.

/usr The base directory for most shareable, read-only data (programs, l ibraries,documentation, and much ore).

/usr/bin Most user programs are kept here (cc, find, du, etc.).

/usr/include Header files for compiling C programs.

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Directory Description/usr/lib Libraries for most binary programs.

/usr/sbin Non-vital system binaries (lpd, useradd, etc.)

/usr/share Architecture-independent data (icons, backgrounds, documentation, terminfo, man pages, etc.).

/usr/src Program source code. E.g. The Linux Kernel, source RPMs, etc.

/usr/X11R6 The X Window System

/var Variable data: mail and printer spools, log files, lock files, etc.

/usr/local “Locally” installed files. This directory only really matters in environments where files are stored on the network. Locally-installed files go in /usr/local/bin, /usr/local/lib, etc.). Also often used forsoftware packages installed from source,or software not officially shipped with the distribution.

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File/Directory Basics

Command Task

ls List filescp Copy filesmv Rename filesrm Delete filesln Link filescd Change directorypwd Print current directory namemkdir Create directoryrmdir Delete directory

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Viewing

Command Task

cat View filesless Page through fileshead View file beginningtail View ending of filenl Number lines of fileod View binary data of fileXxd View binary data with charectergv View Postscript/PDF filesxdvi View TeX DVI files

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Properties

Command Task

stat Display file attributeswc Count bytes/words/linesdu Measure disk usagefile Identify file types /ASCII Filestouch Create new file timestampschown Change file ownerchgrp Change file groupchmod Change file rotections/Permisionchattr Change advanced file attributes/

Special Charecterslsattr List advanced file attributes

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Compression

Command Task

gzip Compress files (GNU Zip)compress Compress files (Unix)bzip2 Compress files (BZip2)zip Compress files (Windows Zip)

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Comparison

Command Task

diff Compare files line by linecomm Compare sorted filescmp Compare files byte by bytemd5sum Compute checksums

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Text Manipulation

Command Task

grep Search text for matching linescut Extract columnspaste Append columnstr Translate characterssort Sort linesuniq Locate identical linestee Copy stdin to a file and

to stdout simultaneously

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Disks and File Systems

Command Task

df Show free disk space file & Dir.mount Make a disk accessiblefsck Check a disk for errorssync Flush disk caches

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

File Location

Command Task

find Locate filesslocate Locate files via indexwhich Locate commandswhereis Locate standard files

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Backups and Remote Storage

Command Task

mt Control a tape drivedump Back up a diskrestore Restore a dumptar Read/write tape archivescdrecord Burn a CDrsync Mirror a set of files

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Audio and Video

Command Task

grip Play CDs and rip MP3sxmms Play audio filescdparanoia Rip audioaudacity Edit audioxcdroast Burn CDs

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

HostsCommand Task

uname Print system informationhostname Print the system’s hostnameifconfig Set/display network informationhost Look up DNSwhois Look up domain registrantsping Check if host is reachabletraceroute View network path to a host

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Spelling Operations

Command Task

look Look up spellingaspell Check spelling interactivelyspell Check spelling in batch

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

NetworkingCommand Task

ssh Securely log into remote hoststelnet Log into remote hostsscp Securely copy files between hostssftp Securely files transfer between hostsftp Copy /Transfer files between hostsevolution GUI email clientmutt Text-based email clientmail Minimal email client

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

mozilla Web browserlynx Text-only web browserwget Retrieve web pages to diskslrn Read Usenet newsgaim Instant messaging/IRCtalk Linux/Unix chatwrite Send messages to a terminalmesg Prohibit talk/write

Command Task

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh

Printing

Command Task

lpr Print fileslpq View print queuelprm Remove print jobs

X

Volksgeist Technologies LLP Vasundhara Presented By Tejveer Singh