Posts

Showing posts with the label Commands

Run linux programs on windows: Cygwin

Image
Have a taste of Linux on Windows We believe that everyone who considers themselves a computer enthusiast should have at least some experience with a Linux environment, but it can be daunting to just jump into the deep end of a completely unfamiliar operating system. One way to get your feet wet is with Cygwin, a free program that provides you with a Unix-like command line, without having to leave Windows. Cygwin is not a Unix emulator (it cannot run native Unix programs, although it does contain the tools needed to compile and run a program from source code), but it does have a wide array of optional packages that let you use most of the tools and utilities that you would commonly use in Unix, in Windows. In this guide, we’ll show you how to get Cygwin set up, the basics of how to navigate a Unix file system, and how to find more information as you need it. 1. Install Cygwin To get started with Cygwin, go to   www.cygwin.com   and click the link that says “Install or updat...

grep overview

Image
grep in Back Track "grep" one of the most frequently used UNIX command stands for " Global Regular Expression Print ". Here I am sharing my experience on use of grep command in Linux with an aim that this would serve as quick guide or tutorial for using grep in UNIX for new beginners and help them to understand the grep command better and its thoughtful usage in UNIX or Linux. Many people use grep just for finding words in a file and missed the real potential of grep by not using all its powerful command line options and its regular expression capability which could not only save a lot of time but also works as a great and powerful tool while analyzing large set of data or log files.  Also find command in UNIX can be used in place of grep at many places. 10 examples of grep command in UNIX and Linux Following examples on grep command in UNIX are based on my experience and I use them on daily basis in my work. These examples are by no means complete so please ...

10 Handy commands

Image
Some linux handy commands for everyday use. 1)Convert Youtube videos to MP3: youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE 2)Get your external public IP: curl ifconfig.me 3)Get a list of IP Addresses that have failed to login via SSH: cat /var/log/auth.log | grep -i "pam_unix(sshd:auth): authentication failure;" | cut -d' ' -f14,15 | cut -d= -f2 | sort | uniq 4)Background a wget download: wget -b http://dl.google.com/android/android-sdk_r14-linux.tgz 5)Transfer files with rsync over ssh on a non-standard port.: rsync -P -e 'ssh -p PORT' SRC DEST 6)Open a file explorer on a split screen inside your vim session: :Sex 7)Change file time stamp: touch -t [[CC]AA]MMJJhhmm[.ss] 8)Tunnel a MySQL server listening on a UNIX socket to the local machine: socat TCP-LISTEN:5500 EXEC:'ssh user@remotehost "socat STDIO UNIX-CONNECT:/var/run/mysqld/mysqld.sock"' 9)Create .pdf from .doc: wvPDF test.doc test.pdf ...

Twitter Search Commands

Image
Twitter search seems fairly basic, which often leads to people using 3rd party Twitter tools for searching. Most people don’t realize it, but Twitter some handy search command abilities: Basic Twitter Search Commands (no surprises here): Multi-word queries: if you search multiple words, Twitter’s default search will search tweets containing both (or all words). Example: big doggy would find tweets that contain both “big” and “doggy”, but not necessarily the words paired together. Exact match queries: if you use quotes, you can limit tweet searches to exact matches. Example: “big doggy” would find tweets that contain the exact phrase “big doggy”. OR queries: if you are looking for two related or interchangable words, OR queries work well. Example: dog OR doggy would find tweets that contain either words. Hash Tag queries: Hash tags used to be one of the only methods of putting a stamp on your tweet to help those searching in Twitter, but they not as critical these...