Useful Linux Commands

640 views

Published on

It's a collection of some lesser known but useful Linux commands. All are "Swiss army knife" one-liners which every Linux user should know.

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
640
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
24
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Useful Linux Commands

  1. 1. Useful Linux Commands -- Deepak Modak
  2. 2. bc An arbitrary precision calculator language
  3. 3. cat - concatenate files and print on the standard output tac - print files in reverse Eg : cat filename tac filename
  4. 4. 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
  5. 5. file - determine the type of file stat - display file or file system status Eg : file filename stat filename
  6. 6. factor Print the prime factors of each specified integer Eg : factor 18
  7. 7. sudo !! Run the last command as root. It automatically prepend sudo to the last command entered.
  8. 8. cd – change to the previous working directory
  9. 9. man ascii Quick access to the ascii table.
  10. 10. curl ifconfig.me Print external IP address
  11. 11. 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 .
  12. 12. Ctrl-l Clear the terminal screen
  13. 13. du -h –max-depth=1 List the size of all sub folders from the current location I human readable form du | sort -nr | less List of files and folders, sorted in descending order by size.
  14. 14. python -m SimpleHTTPServer Serve current directory tree on port 8000. http://localhost:8000/
  15. 15. # 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 #untar Now, just Ctrl + R, and type untar and you get the command! # in shell means a comment.

×