background preloader


Facebook Twitter


Websites for Learning Programming. Unknown Bash Tips and Tricks For Linux. Familiarity breeds ennui, and even though Bash is the default Linux command shell used daily by hordes of contented users, it contains a wealth of interesting and useful features that don't get much attention.

Unknown Bash Tips and Tricks For Linux

Today we shall learn about Bash builtins and killing potential. Bash Builtins Bash has a bunch of built-in commands, and some of them are stripped-down versions of their external GNU coreutils cousins. So why use them? You probably already do, because of the order of command execution in Bash: Bash aliases Bash keywords Bash functions Bash builtins Scripts and executable programs that are in your PATH So when you run echo, kill, printf, pwd, or test most likely you're using the Bash builtins rather than the GNU coreutils commands. . $ command -V echo echo is a shell builtin $ command -V ping ping is /bin/ping The Bash builtins do not have man pages, but they do have a backwards help builtin command that displays syntax and options:

10 tips on working fast in UNIX or Linux. 10 tips for working fast in UNIX Have you ever amazed to see someone working very fast in UNIX, firing commands and doing things in mille seconds?

10 tips on working fast in UNIX or Linux

Yes I have seen and I have always inspired to learn from those gems of guys. This article or tutorial or whatever you call it I have dedicated to share UNIX command practices I follow to work fast, quick or efficiently in UNIX. I work for financial services industry and my work involves development and support of online stock and futures trading application in Electronic trading, Derivatives etc. all our services runs of UNIX servers so its very important for me to work efficiently and quickly in Linux machine. How to kill a TCP connection using netstat. Linux: Check Network Connection Command. How do I check network connections under Linux using command line options?

Linux: Check Network Connection Command

You need to use any one of the following tool or command under Linux to check network connections including their state, source/destination, and addresses and bandwidth usage etc: ss command: It dump socket (network connection) statistics such as all TCP / UDP connections, established connection per protocol (e.g., display all established ssh connections), display all the tcp sockets in various state such as ESTABLISHED or FIN-WAIT-1 and so on.netstat command: It can display network connections, routing tables, interfaces and much more.tcptrack and iftop commands: Displays information about TCP connections it sees on a network interface and display bandwidth usage on an interface by host respectively. Display Currently Established, Closed, Orphaned and Waiting TCP sockets, enter:

How to monitor your Linux machine with netstat. Netstat is an extremely useful Linux command line tool that allows you to check which service is connecting to a port on your machine.

How to monitor your Linux machine with netstat

It is very useful to analyze what’s going on on your machine when you are facing or trying to to prevent an attack on it. You can find information such as how many connection are being made on a port, which IP addresses these connections originate from, and much more. Netstat ships with most distributions of Linux so it should already be installed on yours. Launch a shell terminal on your machine and run the following command: # netstat -ant Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 ::ffff: ::ffff: TIME_WAIT tcp 0 0 ::ffff: ::ffff: TIME_WAIT tcp 0 0 ::ffff: ::ffff: TIME_WAIT The output will most likely be very long. . # netstat -ant | grep 80 # netstat -ant | grep 80 | wc -l 625. Manage Log File Size - Ubuntu Guide For Windows Users. I'm new to Ubuntu and want to know how does one manage all these log files?

Manage Log File Size - Ubuntu Guide For Windows Users

They must be taking up a lot of space. I would like to clean them out, in the same way that I can when using Event Viewer in Windows 2000/XP. While Windows users are familiar with Event Viewer for monitoring application, system, security logs and how to manage or archive log files, administering log files on Ubuntu (or any Linux distribution) is not easily found by new users. The mechanism for managing log size, archiving (rotation), and deleting is accomplished with a utility called logrotate. Logrotate is installed during installation, has no GUI interface and is managed via configuration files which is run by a daily cron job.

To see which log files currently are setup with logrotate, open a Terminal window (Application \Accessories) or Nautilis File browser (Places \ Computer then click on File System) and navigate to /etc/logrotate.d # see "man logrotate" for details # rotate log files weekly weekly. View log files in Ubuntu Linux. How change display resolution settings using xrandr  Troubleshooting Using dmesg Command in Unix and Linux. By Balakrishnan Mariyappan on October 26, 2010 During system bootup process, kernel gets loaded into the memory and it controls the entire system.

Troubleshooting Using dmesg Command in Unix and Linux

When the system boots up, it prints number of messages on the screen that displays information about the hardware devices that the kernel detects during boot process. These messages are available in kernel ring buffer and whenever the new message comes the old message gets overwritten. Converting videos in Ubuntu using FFMPEG. If you are a multimedia junkie and felt it your karma to convert tons of videos and music to popular formats, then FFMPEG is the right tool for you.

Converting videos in Ubuntu using FFMPEG

FFmpeg is a free video converter and so much more. It can be found in the default Ubuntu repository and also comes pre-installed in most other distro's. It's an open source project that contains an infinite number of libraries, the most noticeable among them is the libavcodec (for encoding and decoding of the audio and video data ) and libavformat( mux demux library). Thats not all. It can also be used for more advanced functions like slowing down the frame rate, resizing the video and many more. Cron. 15 Examples To Master Linux Command Line History. When you are using Linux command line frequently, using the history effectively can be a major productivity boost.

In fact, once you have mastered the 15 examples that I’ve provided here, you’ll find using command line more enjoyable and fun. Replay your terminal recordings online! (capture shell terminal recording and replay online), Learn the Linux command line. Write shell scripts. Learn the Linux command line. Write shell scripts. Bash commands - Linux MAN Pages. Commands marked • are bash built-ins Many commands particularly the Core Utils are also available under alternate shells (C shell, Korn shell etc).

More bash commands: Linux Command Directory from O'Reilly, GNU CoreUtils.SS64 bash discussion forumLinks to other Sites, books etc. 50 Most Frequently Used UNIX / Linux Commands (With Examples) This article provides practical examples for 50 most frequently used commands in Linux / UNIX.

50 Most Frequently Used UNIX / Linux Commands (With Examples)

This is not a comprehensive list by any means, but this should give you a jumpstart on some of the common Linux commands. Bookmark this article for your future reference.