Sunday, 13 May 2018

BCA/BTech Computer Science/MCA - Useful Linux Commands Summary (#eduvictors)(#ipmusings)(#bcanotes)

Useful Linux Commands

BCA/BTech Computer Science/MCA - Useful Linux Commands Summary (#eduvictors)(#ipmusings)(#bcanotes)

File/Directory Basics Commands

ls List files
ls -al formatted listing with hidden files
cp Copy files
mv Rename files
rm Delete files
rm -r dir delete directory dir
rm -f file          force remove file
ln Link files
ln -s file link create symbolic link link to file
cd Change directory
pwd Print current directory name
mkdir Create directory
rmdir Delete directory


File Viewing Commands

cat View files
less Page through files
head View file beginning
tail View file ending
nl Number lines
od View binary data
xxd View binary data
gv View Postscript/PDF files
xdvi View TeX DVI files




File Creation and Editing

emacs Text editor
vim Text editor
nano Text editor
umask Set default file protections
soffice Edit Word/Excel/PowerPoint docs
abiword Edit Word documents
gnumeric Edit Excel documents
libreoffice Edit Word/Excel/PowerPoint docs


File Properties Commands

stat Display file attributes
wc Count bytes/words/lines
du Measure disk usage
file Identify file types
touch Change file timestamps
chown Change file owner
chgrp Change file group
chmod Change file protections
chattr Change advanced file attributes
lsattr List advanced file attributes


File Find or Location commands

find Locate files
slocate Locate files via index
which Locate commands
whereis Locate standard files


File Text Manipulation

grep Search text for matching lines
cut Extract columns
paste Append columns
tr Translate characters
sort Sort lines
uniq Locate identical lines
tee Copy stdin to a file and to stdout simultaneously


File Compression Uilts

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


File Comparison

diff Compare files line by line
comm Compare sorted files
cmp Compare files byte by byte
md5sum Compute checksums


Disks and File systems related commands

df Show free disk space
mount Make a disk accessible
fsck Check a disk for errors
sync Flush disk caches

Backups and Remote Storage
mt Control a tape drive
dump Back up a disk
restore Restore a dump
tar Read/write tape archives
cdrecord Burn a CD
rsync Mirror a set of files

System related
date show the current date and time
cal show this month's calendar
uptime show current uptime
whoami who you are logged in as
finger user      display information about user
uname -a show kernel information
cat /proc/cpuinfo cpu information
cat /proc/meminfo  memory information
man command show the manual for command
free show memory and swap usage

Network related commands
ping host ping host and output results
whois domain get whois information for domain
dig domain get DNS information for domain
dig -x host reverse lookup host
wget file download file

No comments:

Post a Comment