Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Thursday, September 18, 2014
Linux for dummies like myself
You will be amazed about how incredible the materials out there from which we can learn. Below is some:
Ryan's Tutorial has this amazing Linux basic tutorial:
http://ryanstutorials.net/linuxtutorial/
I have learned a lot about bash command in Linux system from Ryan's Tutorial.
I found the book "Linux All-in-One For Dummies" very informative about Linux system you may need. More importantly, you can get it free from IT ebooks for free.
It's quite different to issue all kinds of commands in the shell in Linux system. Although it seems hard to get on your hand at the first sight, you may be quite familiar with how things work after you get to know some basic commands and get your hand wet in this.
grep can be used to search this keyword in a file/log in Linux. It's very handy feature to search. The system will provide the search result in no time. It's suitable to extract the specific thing you can looking for in some large files. e.g. grep "keyword" /destination/location. Another example: scan_r |grep delay; the command is also known as a combined command.
cat displays the content of a file on the command screen. e.g. cat /home/file
at any stage, if you feel like to issue the command in more than one line, and would like to break a line into a new line, you can use backslash \.
e.g. ls /etc; cat \
file |grep name
Asterisk (*): Matches zero or more characters in a filename. That means* denotes all files in a directory.
Question mark (?): Matches any single character. If you type test?, thatmatches any five-character text that begins with test.
Set of characters in brackets: Matches any single character from that set. The string [aB], for example, matches only files named a or B, The string [aB]*, though, matches any filename that starts with a or B.
cp can copy a file/directory from one location to another. e.g. cp -avr /source/location /dest/location
Two takeout note for new learner like me:
1. up-arrow is your best companion... it can bring up all history command that's ever issued in that command window. It will become handy when you ask somebody to perform some tasks and you can review and learn the command afterwards. Also, Tab button saves a lot of time to type something in full... double press Tab can bring up any files that match your current partial input if there's any.
2. avoid using space in file name. If you do use a space in a filename, you have to use backslash \ before each space. If you want to copy the file it would also cause problem... If you have to deal with tons of files, say PNG screenshots, that contains space in it, just tar (compress approach) everything would do the trick.
Subscribe to:
Posts (Atom)