Go back to fronty page View most popular entries View latest additions Submit tutorials to UnixTutorials.info
UnixTutorials logo

Search results for Command-line calculations using bc

Ubuntu

Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10)

Post date: January 27, 2011, 12:01 Category: Installing Views: 3049 Comments
Tutorial quote: This tutorial describes how you can set up a development environment for building Android apps on an Ubuntu 10.10 desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms).
Unix+clones

Execute Commands on Multiple Linux or UNIX Servers part II

Post date: December 28, 2005, 10:12 Category: System Views: 3855 Comments
Tutorial quote: I have already covered how to execute commands on multiple Linux or UNIX servers via shell script. The disadvantage of script is commands do not run in parallel on all servers. However, several tools exist to automate this procedure in parallel. With the help of tool called tentakel, you run distributed command execution. It is a program for executing the same command on many hosts in parallel using ssh (it supports other methods too). Main advantage is you can create several sets of servers according requirements. For example webserver group, mail server group, home servers group etc. The command is executed in parallel on all servers in this group (time saving). By default, every result is printed to stdout (screen). The output format can be defined for each group.
Debian

Android App Build Environment (Eclipse/Android SDK/PhoneGap) On Debian Squeeze

Post date: March 7, 2011, 00:03 Category: Installing Views: 3758 Comments
Tutorial quote: This tutorial describes how you can set up an development environment for building Android apps on a Debian Squeeze desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms).
Linux

Arcane Linux Commands: dc

Post date: December 31, 2007, 01:12 Category: Miscellaneous Views: 4031 Comments
Tutorial quote: If anybody within earshot of you is struggling to learn sed and ever remarks "This is like learning Klingon! Could they make it any more cryptic?", you can always point them to dc.

dc is the command-line Unix "Reverse-Polish Notation"(RPN) calculator. The name stands for "desktop calculator". OK, so what is a Polish calculator and why would you want to reverse one? The math that you do in school uses infix notation, with the operator between the numbers (3 + 5). Prefix notation puts the operator first (+ 3 5) and is what the Lisp language uses. The prefix notation is known as "Polish notation" after the nationality of Jan Łukasiewicz who invented it. Postfix notation, then, has the operator at the rear (3 5 +), and so is also the reverse of Polish notation.

What's the difference? In computer programming, you have to specify what order you want a multi-part calculation to be in. Everybody is familiar with the old problem of A*B-C. For A=5, B=3, C=2, multiplying first and subtracting second gives you 13, while subtracting first and multiplying second gives you 5. To specify which operations you want performed first, you have to either memorize the complex orders of operations (which change from one language to the next) or use a lot of parenthesis ((A*B)-C) or (A*(B-C)). Hey, that's what everybody complains about in all those languages that use parenthesis!
FreeBSD

Using Software RAID-1 with FreeBSD

Post date: November 29, 2005, 03:11 Category: System Views: 4246 Comments
Tutorial quote: Have you ever needed a software RAID solution for a low-end server install? Perhaps you've wanted your workstation to take advantage of the redundancy provided by a disk mirror without investing in a hardware RAID controller. Has a prior painful configuration experience turned you off software RAID altogether on Unix systems?


Since 5.3-Release, FreeBSD comes with gmirror(8), which allows you to easily configure a software RAID 1 solution. While tutorials on gmirror exist, I found them to require either manual calculations of partition sizes with bsdlabel or the use of a fix-it floppy on an existing system.

It made more sense to me to configure RAID during the install of the operating system. I also wanted a procedure that was easy to follow and didn't introduce human error in the form of a math miscalculation. After cobbling together the available documentation and experimenting my way through various configurations, I came across a procedure that has worked well for me on several different systems. I also received valuable feedback from Pawel Jakub Dawidek, the author of gmirror, who gave some insight into some of the not yet documented features of gmirror.
Debian

Little-known APT utilities for Debian desktop users

Post date: July 30, 2006, 18:07 Category: Desktop Views: 3079 Comments
Tutorial quote: The Advanced Packaging Tool (APT) is a distinguishing feature of Debian-based systems. APT was the first major alternative in GNU/Linux to boast automatic dependency resolution. Most GNU/Linux users know it through the apt-get command, a utility that calls on the lower-level dpkg command. However, other APT-based utilities remain largely unknown to desktop users. Some of these utilities offer a range of functionality far beyond those of the basic tools.
Linux

Rip DVDs in Linux the (Semi-)Easy Way

Post date: December 8, 2007, 14:12 Category: Multimedia Views: 3962 Comments
Tutorial quote: With its hacker-friendly aesthetic and open source mentality, you'd think a Linux desktop would be the best place to assert your digital rights—you know, make backup copies of your DVDs, convert them for iPods, that kind of thing.

And you'd be half right. There are plenty of programs that let you take control of your video discs, but they're only useful if you can make it through a maze of configuration menus, command line options, choices about bit rates and codecs, and the occasional confusing message about a missing library.

I've tried out a good number of DVD ripping and conversion programs, and I've made peace with one method, and one program, that gets the job done more often than not. It's not exactly one-click, but once your system is set up, you can drop in DVDs and back them up or convert them with relative ease.

Note on system differences: I set up my ripping/burning system on a Lenovo Thinkpad T61 running a brand-new installation of Ubuntu 7.10 (Gutsy Gibbon). As with so many things Linux, packages and commands may vary based on your system. But for the most part, the tools I use in this walkthrough work across distributions and on both major desktop environments, GNOME and KDE.
Linux

Three tools to help you configure iptables

Post date: May 25, 2005, 14:05 Category: Network Views: 3530 Comments
Tutorial quote: Every user whose client connects to the Internet should configure his firewall immediately after installation. Some Linux distributions include firewall configuration as a part of installation, often offering a set of defaults configurations to choose from. However, to ensure that your machine presents the minimum "attack surface" (a measure of the number of vulnerable ports, user accounts, and sockets exposed to attack) to the predatory inhabitants of the Internet, you may need to do some manual configuration of your firewall. Here are three tools that can help.
The Linux kernel (version 2.4 onwards) contains a framework for packet filtering and firewalling using netfilter and iptables. Netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. Iptables is a generic table structure for the definition of rulesets. Each rule within an IP table consists of a number of classifiers (iptables matches) and one connected action (iptables target). Iptables has extensive documentation that can be accessed online or by typing man iptables at the command line. Yet despite the depth of the documentation available for iptables, its complexity can be baffling.
Ubuntu

Disk ARchive (Backup and Restore) using dar and kdar(dar Frontend)

Post date: January 12, 2007, 18:01 Category: System Views: 4185 Comments
Tutorial quote: Dar is a shell command that makes backup of a directory tree and files. Its features include splitting archives over several files, CDs, ZIPs, or floppies, compression, full or differential backups, strong encryption, proper saving and restoration of hard links and extended attributes, remote backup using pipes and external command (such as ssh), and rearrangement of the “slices” of an existing archive. It can now run commands between slices, encrypt archives, and quickly retrieve individual files from differential and full backups. Dar also has external GUI like kdar for Linux,thanks to the well documented API.
Linux

Linux Commands Line

Post date: January 5, 2008, 22:01 Category: Miscellaneous Views: 4591 Comments
Tutorial quote: Complete and updated list of commands on Linux - over 350 commands divided into arguments!
Web-based applications and online marketing solutions - LumoLink