Useful Linux Commands
-
Upload
deepak-modak -
Category
Education
-
view
457 -
download
8
description
Transcript of Useful Linux Commands
Useful Linux Commands
-- Deepak Modak
bc An arbitrary precision calculator language
cat - concatenate files and print on the standard output
tac - print files in reverse
Eg : cat filename
tac filename
ls - list directory contents
sl - display animations aimed to correct users who
accidentally enter sl instead of ls.
* sl is not a linux command , need to install package
file - determine the type of file
stat - display file or file system status
Eg : file filename
stat filename
factor
Print the prime factors of each specified integer
Eg : factor 18
sudo !!
Run the last command as root. It automatically prepend sudo to the last command entered.
cd –change to the previous working directory
man ascii
Quick access to the ascii table.
curl ifconfig.me
Print external IP address
wget --random-wait -r -p -e robots=off -U mozilla http://www.example.com
The non-interactive network downloader It will download all files, including images mozilla as browsers
identity .
Ctrl-l
Clear the terminal screen
du -h –max-depth=1List the size of all sub folders from the current location
Ihuman readable form
du | sort -nr | less
List of files and folders, sorted in descending order by size.
python -m SimpleHTTPServer
Serve current directory tree on port 8000. http://localhost:8000/
# Tag
Hash tags to organize bash history and very good for finding very long commands
Step : • Just add a hash tag in every command you type at the end,• Later can search for the hash tag in reverse-i-search (Ctrl + R).
Eg: $ tar -xzvf filename #untarNow, just Ctrl + R, and type untar and you get the command!
# in shell means a comment.