Posts

Truncate a file or Log

To trancate a log file which is used by a continuous process is simple:): :>logfile

File compression tools for Linux

File compression tools for Linux Share Print Comments Among the confusion new Linux users often face is the variability among archived and compressed formats used by downloaded applications. "Should I use the tar.gz file, the zip file, or the tar.bz2 file?" they may wonder. Here's what you need to know about compression formats in order to easily install any application. First, consider the distinction between archiving and compression. Archiving means combining a number of files together into one file. The idea is to achieve easier storage and transportation. It's like having a briefcase in which to keep all your files. The archive must contain some information about the original files, such as their names and lengths, for proper reconstruction. This ensures that your paperwork will remain as-is when you open your briefcase. Some popular archive file formats are tar and zip. Compression, on the other hand, is the process of using encoding schemes to store inf...

Cron Help

Cron This file is an introduction to cron, it covers the basics of what cron does, and how to use it. What is cron? Cron is the name of program that enables unix users to execute commands or scripts (groups of commands) automatically at a specified time/date. It is normally used for sys admin commands, like makewhatis , which builds a search database for the man -k command, or for running a backup script, but can be used for anything. A common use for it today is connecting to the internet and downloading your email. This file will look at Vixie Cron, a version of cron authored by Paul Vixie. How to start Cron Cron is a daemon, which means that it only needs to be started once, and will lay dormant until it is required. A Web server is a daemon, it stays dormant until it gets asked for a web page. The cron daemon, or crond , stays dormant until a time specified in one of the config files, or crontabs . On most Linux distributions crond is automatically in...

Compiling and Installing Software from Source

So you've downloaded a software package with tar.gz or tar.bz2 extension and have no idea what to do with it. Or perhaps you already know that it's most likely the source code of the program you want to install and you have to compile it, but don't know how. Don't worry, compiling and installing software from source in Linux isn't as hard as it may sound! The installation procedure for software that comes in tar.gz and tar.bz2 packages isn't always the same, but usually it's like this: # tar xvzf package.tar.gz (or tar xvjf package.tar.bz2) # cd package # ./configure # make # make install If you're lucky, by issuing these simple commands you unpack, configure, compile, and install the software package and you don't even have to know what you're doing. However, it's healthy to take a closer look at the installation procedure and see what these steps mean. Maybe you've already noticed that the package containing the source code of the progr...

Introduction to Linux

Linux Shortcuts and Commands: Linux Newbie Administrator Guide by Stan and Peter Klimas This is a practical selection of the commands we use most often. Press to see the listing of all available command (on your PATH). On my small home system, it says there are 2595 executables on my PATH. Many of these "commands" can be accessed from your favourite GUI front-end (probably KDE or Gnome) by clicking on the right menu or button. They can all be run from the command line. Programs that require GUI have to be run from a terminal opened under a GUI. Legend: = single special or function key on the keyboard. For example indicates the "control" key. italic = name of the file or variable you probably want to substitute with your own. fixed width = in-line Linux commands and filenames. Notes for the UNIX Clueless: 1. LINUX IS CASE-SENSITIVE. For example: Netscape, NETSCAPE and nEtscape are three different commands. Also my_filE, my_file, and my_FILE are three different files...