background preloader

Learning the shell.

Learning the shell.

Blog Archive » 7 Cool Things to Do With Linux So you’ve taken the plunge and installed Linux. You’ve followed all the HOWTOs all over the net. You’ve got your wireless card working flawlessly. You’ve got your video card working (and you’ve begun to loathe that spinning cube). You’ve installed all the “restricted” software like Adobe Flash, Sun Java and Google Earth. You’ve got all the patent restricted codecs and even DVD playback working just like you want. Use Your computer as a Home Theater PC. MyDSL: Installing Extensions - DSL Wiki From DSL Wiki This site in other languages: Deutsch, Español Installing MyDSL Extensions There are various ways in which to install a myDSL extension, but basically you have two main options: Install from an online myDSL repository. Installing From A MyDSL Repository The way to do this is through the use of the MyDSL Extension Browser. Steps: Make sure you are logged in as user dsl Open the MyDSL Extension Browser Select the category[1] you want to browse Select the package you want. The extension will be automatically downloaded to the directory specified in .mydsl_dir (default is /tmp), checked for corruption, and then installed. Note: You must ensure that the group permissions for /tmp be set to staff as some builds may default to root. If you want to install extensions manually, use the DSL Extensions repository. Installing A Local Extension After downloading, You can use the Extension Browser mentioned above to load the extension. mydsl-load /path/to/my/extension[3] See Also:

An Introduction to awk The awk programming language often gets overlooked for Perl, which is a more capable language. Out in the real world, however awk is found even more ubiquitously than Perl. It also has a smaller learning curve than Perl does, and awk can be used almost everywhere in system monitoring scripts, where efficiency is key. This brief tutorial is designed to help you get started in awk programming. The awk language is a small, C-style language designed for the processing of regularly formatted text. awk's funny name comes from the names of its original authors, Alfred V. I began using awk to print specific fields in output. ls -l /tmp/foobar | awk '{print $1"\t"$9}' This code takes some input, such as this: -rw-rw-rw- 1 root root 1 Jul 14 1997 tmpmsg and generates output like this: -rw-rw-rw- tmpmsg As shown, the code output only the first and ninth fields from the original input. One of my favorite things about awk is its amazing readability, especially as compared to Perl or Python. #! #! #!

LSST v1.05 > Chapter 8 > Examples of Shell Scripts These exercises are to test your general understanding of the shell scripting. My advise is first try to write this shell script yourself so that you understand how to put the concepts to work in real life scripts. For sample answer to exercise you can refer the shell script file supplied with this tutorial. If you want to become the good programmer then your first habit must be to see the good code/samples of programming language then practice lot and finally implement the your own code (and become the good programmer!!!). Q.1. Q.2.Write Script to find out biggest number from given three nos. Q.3.Write script to print nos as 5,4,3,2,1 using while loop. Q.4. Q.5.Write Script to see current date, time, username, and current directory Answer: See Q5 shell Script. Q.6.Write script to print given number in reverse order, for eg. Q.7.Write script to print given numbers sum of all digit, For eg. Q.9.How to calculate 5.12 + 2.5 real number calculation at $ prompt in Shell ? Q.13. Q.14. Q.15.

Regular Expression Tutorial This tutorial teaches you all you need to know to be able to craft powerful time-saving regular expressions. It starts with the most basic concepts, so that you can follow this tutorial even if you know nothing at all about regular expressions yet. The tutorial doesn't stop there. It also explains how a regular expression engine works on the inside, and alert you at the consequences. This helps you to quickly understand why a particular regex does not do what you initially expected. It will save you lots of guesswork and head scratching when you need to write more complex regexes. What Regular Expressions Are Exactly - Terminology Basically, a regular expression is a pattern describing a certain amount of text. This first example is actually a perfectly valid regex. \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\. With the above regular expression pattern, you can search through a text file to find email addresses, or verify if a given string looks like an email address. Different Regular Expression Engines

netfilter/iptables project homepage - The netfilter.org project Search A rootkit is a stealthy type of software, typically malicious, designed to hide the existence of certain processes or programs from normal methods of detection and enable continued privileged access to a computer.[1] The term rootkit is a concatenation of "root" (the traditional name of the privileged account on Unix operating systems) and the word "kit" (which refers to the software components that implement the tool). The term "rootkit" has negative connotations through its association with malware.[1] History[edit] The first malicious rootkit for the Windows NT operating system appeared in 1999: a trojan called NTRootkit created by Greg Hoglund.[8] It was followed by HackerDefender in 2003.[1] The first rootkit targeting Mac OS X appeared in 2009,[9] while the Stuxnet worm was the first to target programmable logic controllers (PLC).[10] Sony BMG copy protection rootkit scandal[edit] To cloak itself, the rootkit hid from the user any file starting with "$sys$". Uses[edit] Types[edit]

Easy Automated Snapshot-Style Backups with Rsync page last modified 2004.01.04 Updates: As of rsync-2.5.6, the --link-dest option is now standard! That can be used instead of the separate cp -al and rsync stages, and it eliminates the ownerships/permissions bug. I now recommend using it. Contents AbstractMotivationUsing rsync to make a backup Basics Using the --delete flag Be lazy: use cronIncremental backups with rsync Review of hard links Using cp -al Putting it all together I'm used to dump or tar! Abstract This document describes a method for generating automatic rotating "snapshot"-style backups on a Unix-based system, with specific examples drawn from the author's GNU/Linux experience. Motivation Note: what follows is the original sgvlug DEVSIG announcement. Ever accidentally delete or overwrite a file you were working on? Best of all, what if you could make all of that happen automatically, using only one extra, slightly-larger, hard disk? Using rsync to make a backup Basics rsync -a source/ destination/ cp -a source/. destination/

UncomplicatedFirewall Introduction The Linux kernel in Ubuntu provides a packet filtering system called netfilter, and the traditional interface for manipulating netfilter are the iptables suite of commands. iptables provide a complete firewall solution that is both highly configurable and highly flexible. Becoming proficient in iptables takes time, and getting started with netfilter firewalling using only iptables can be a daunting task. The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls. ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall. ufw aims to provide an easy to use interface for people unfamiliar with firewall concepts, while at the same time simplifies complicated iptables commands to help an adminstrator who knows what he or she is doing. ufw is an upstream for other distributions and graphical frontends. UFW in Ubuntu Available Versions in supported versions of Ubuntu

Terminal Tip: ASCII-ify your Videos - The Unofficial Apple Weblog (TUAW) I'm kind of on an ASCII kick this weekend. Having already brought you ASCII banners, I thought I'd follow that up with ASCII video playback. Apple's ASCII Movie Player, which you can download here, allows you to view any QuickTime compatible media from the Terminal. Above, you see last week's episode of Heroes--that's Peter, in case you didn't recognize him from the screen shot. The ASCII Movie Player disk image contains a compiled Universal Binary application file. With ASCII Movie Player, you can play any media that works with QuickTime. As a rule of thumb, display looks best with white-on-black rather than Terminal's default black-on-white. Update: colorized version can be found here. Update 2: Both Mplayer and VLC provide ASCII art output using the -libcaca module.

Related:  Computingshelltantanchennecrodiashell