from small one page howto to huge articles all in one place
 

search text in:







Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

4133

userrating:

no votes yet


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->sys-devel->make

Thanks to Lars Weiler for providing this week's tip.

Usualy make from sys-devel/make is known as a tool for compiling applications. But it could also be used to provide often used commands so that they can be accessed easily.

Quite everybody wants to do backups. This could be done by packing them with tar. For instance, we want to pack the ~/Mail folder and name the file with a date:

Code Listing 1: tar ~/Mail with date included


$ tar cvjf ~/Backups/Mail-`date +%F`.tar.bz2 ~/Mail


After that we copy that file (and possibly more) to another computer by using rsync and delete all the files in ~/Backups afterwards:

Code Listing 2: Copy backup-file to another computer with rsync


$ rsync -avute ssh ~/Backups/ user@othermachine:~/Backups/
% rm ~/Backups/*


And now comes the clue with make. After a week you already forgot the commands. Why not store them in a Makefile located in the home-directory, so that you only have to call make backup?

Inside the Makefile (beware of the uppercased 'M') we provide two targets for the commands, so that we can call them separately, e.g. if you only want to copy the files. The first target backup will only call the other targets in the given order:

Code Listing 3: Sample Makefile for backups


backup: compress \
copy

compress:
tar cvjf ~/Backups/Mail-`date +%F`.tar.bz2 ~/Mail

copy:
rsync -avute ssh ~/Backups/ user@othermachine:~/Backups/
rm ~/Backups/*



Now we can call make backup in the home directory and the ~/Mail-folder will be compressed and copied to the other computer. The restore-command-set will be your homework ;-)

Of course, there is a wide use for batched processes with Makefiles. Think about all the things you ever wanted to have scripted with easy usability. You can find more instructions in the info make pages.
rate this article:
current rating: no votes yet
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back
comment this article
Please read "Why adblockers are bad".



to the forum.
:
:
other Ads
Stellenangebote
Stellenangebote
für Fach- und
Führungskräfte
www.nachoben.com
Trace My Cash
Wenn Sie sich schon immer mal gefragt haben, wo eigentlich Ihr geliebtes Bargeld geblieben ist, finden Sie hier vielleicht die Antwort.
www.tracemycash.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2009-01-07
hostapd - 0.6.7
Ebuild name:

net-wireless/hostapd-0.6.7

Description

IEEE 802.11 wireless LAN Host AP daemon

Added to portage

2009-01-07

2009-01-06
bakery - 2.6.2
Ebuild name:

dev-cpp/bakery-2.6.2

Description

Bakery is a C++ Framework for creating GNOME applications using gtkmm.

Added to portage

2009-01-06

boost - 1.35.0-r4
Ebuild name:

dev-libs/boost-1.35.0-r4

Description

Boost Libraries for C++

Added to portage

2009-01-06

bullet - 2.73-r1
Ebuild name:

sci-physics/bullet-2.73-r1

Description

Continuous Collision Detection and Physics Library

Added to portage

2009-01-06

cppserv - 0.2.1
Ebuild name:

dev-cpp/cppserv-0.2.1

Description

CPPSERV is an application server providing Servlet-like API in C++ and a C++

Added to portage

2009-01-06

darkstat - 3.0.712
Ebuild name:

net-analyzer/darkstat-3.0.712

Description

darkstat is a network traffic analyzer

Added to portage

2009-01-06

deluge - 1.1.0_rc3
Ebuild name:

net-p2p/deluge-1.1.0_rc3

Description

BitTorrent client with a client/server model.

Added to portage

2009-01-06

edox-data - 0.16.8.0.2
Ebuild name:

app-doc/edox-data-0.16.8.0.2

Description

The Enlightenment online help

Added to portage

2009-01-06

enlightenment - 0.16.8.15
Ebuild name:

x11-wm/enlightenment-0.16.8.15

Description

Enlightenment Window Manager

Added to portage

2009-01-06

epplets - 0.12
Ebuild name:

x11-plugins/epplets-0.12

Description

Base files for Enlightenment epplets and some epplets

Added to portage

2009-01-06

eselect-boost - 0.2
Ebuild name:

app-admin/eselect-boost-0.2

Description

boost module for eselect

Added to portage

2009-01-06

ethemes - 0.16.8.0.3
Ebuild name:

x11-themes/ethemes-0.16.8.0.3

Description

all the official Enlightenment themes

Added to portage

2009-01-06

evilvte - 0.4.4_pre9
Ebuild name:

x11-terms/evilvte-0.4.4_pre9

Description

VTE based, super lightweight terminal emulator

Added to portage

2009-01-06

fcitx - 3.6.0_rc
Ebuild name:

app-i18n/fcitx-3.6.0_rc

Description

Free Chinese Input Toy for X. Another Chinese XIM Input Method

Added to portage

2009-01-06

gcompris - 8.4.8
Ebuild name:

games-kids/gcompris-8.4.8

Description

full featured educational application for children from 2 to 10

Added to portage

2009-01-06

gdm - 2.20.9
Ebuild name:

gnome-base/gdm-2.20.9

Description

GNOME Display Manager

Added to portage

2009-01-06

genkernel - 3.4.10.903
Ebuild name:

sys-kernel/genkernel-3.4.10.903

Description

Gentoo automatic kernel building scripts

Added to portage

2009-01-06

git-sources - 2.6.28-r8
Ebuild name:

sys-kernel/git-sources-2.6.28-r8

Description

The very latest -git version of the Linux kernel

Added to portage

2009-01-06

glade-sharp - 2.8.2
Ebuild name:

dev-dotnet/glade-sharp-2.8.2

Description

Based on the eclass

Added to portage

2009-01-06

gnome-user-share - 0.41
Ebuild name:

gnome-extra/gnome-user-share-0.41

Description

Personal file sharing for the GNOME desktop

Added to portage

2009-01-06

gtk-sharp - 2.8.2
Ebuild name:

dev-dotnet/gtk-sharp-2.8.2

Description

Gtk is a C language binding for the GTK2 toolkit and GNOME libraries

Added to portage

2009-01-06

gtk-sharp-gapi - 2.12.7-r6
Ebuild name:

dev-dotnet/gtk-sharp-gapi-2.12.7-r6

Description

GtkSharp's module

Added to portage

2009-01-06

hal - 0.5.11-r6
Ebuild name:

sys-apps/hal-0.5.11-r6

Description

Hardware Abstraction Layer

Added to portage

2009-01-06

hourglass - 0.7.1
Ebuild name:

app-office/hourglass-0.7.1

Description

A PSP (personal software process) time tracking utility written in Java

Added to portage

2009-01-06

irtrans-irserver - 5.12.08
Ebuild name:

app-misc/irtrans-irserver-5.12.08

Description

IRTrans Server

Added to portage

2009-01-06

iwl4965-ucode - 228.57.2.23
Ebuild name:

net-wireless/iwl4965-ucode-228.57.2.23

Description

Intel (R) Wireless WiFi Link 4965AGN ucode

Added to portage

2009-01-06

libdrm - 2.4.3
Ebuild name:

x11-libs/libdrm-2.4.3

Description

X.Org libdrm library

Added to portage

2009-01-06

lxde-meta - 0.3.2.1-r1
Ebuild name:

lxde-base/lxde-meta-0.3.2.1-r1

Description

Meta ebuild for LXDE, the Lightweight X11 Desktop Environment

Added to portage

2009-01-06

moon-buggy - 1.0.51
Ebuild name:

games-action/moon-buggy-1.0.51

Description

A simple console game, where you drive a car across the moon's surfa

Added to portage

2009-01-06

pyPdf - 1.12
Ebuild name:

dev-python/pyPdf-1.12

Description

Python library to work with pdf files

Added to portage

2009-01-06

qt-assistant - 4.4.2-r1
Ebuild name:

x11-libs/qt-assistant-4.4.2-r1

Description

The assistant help module for the Qt toolkit.

Added to portage

2009-01-06

qt-gui - 4.4.2-r1
Ebuild name:

x11-libs/qt-gui-4.4.2-r1

Description

The GUI module(s) for the Qt toolkit.

Added to portage

2009-01-06

quota - 3.17
Ebuild name:

sys-fs/quota-3.17

Description

Linux quota tools

Added to portage

2009-01-06

rpyc - 3.02
Ebuild name:

dev-python/rpyc-3.02

Description

Remote python call

Added to portage

2009-01-06

sdlmame - 0.129
Ebuild name:

games-emulation/sdlmame-0.129

Description

Multiple Arcade Machine Emulator (SDL)

Added to portage

2009-01-06

sofia-sip - 1.12.10
Ebuild name:

net-libs/sofia-sip-1.12.10

Description

RFC3261 compliant SIP User-Agent library

Added to portage

2009-01-06

telepathy-sofiasip - 0.5.11
Ebuild name:

net-voip/telepathy-sofiasip-0.5.11

Description

A SIP connection manager for Telepathy based around the Sofia-SI

Added to portage

2009-01-06

vdr-dxr3 - 0.2.9
Ebuild name:

media-plugins/vdr-dxr3-0.2.9

Description

VDR plugin: Use a dxr3 or hw+ card as output device

Added to portage

2009-01-06

vdr-fritzbox - 1.1.4
Ebuild name:

media-plugins/vdr-fritzbox-1.1.4

Description

VDR Plugin: Inform about incoming phone-calls and use the fritz!bo

Added to portage

2009-01-06

vdr-image - 0.3.0
Ebuild name:

media-plugins/vdr-image-0.3.0

Description

VDR plugin: display of digital images, like jpeg, tiff, png, bmp

Added to portage

2009-01-06

vdr-osdteletext - 0.7.0
Ebuild name:

media-plugins/vdr-osdteletext-0.7.0

Description

VDR Plugin: Osd-Teletext displays the teletext on the OSD

Added to portage

2009-01-06

vdr-ttxtsubs - 0.0.8
Ebuild name:

media-plugins/vdr-ttxtsubs-0.0.8

Description

VDR Plugin: displaying, recording and replaying teletext based sub

Added to portage

2009-01-06

vdradmin-am - 3.6.4
Ebuild name:

net-www/vdradmin-am-3.6.4

Description

WWW Admin for the Video Disk Recorder

Added to portage

2009-01-06

wicd - 1.5.8
Ebuild name:

net-misc/wicd-1.5.8

Description

A lightweight wired and wireless network manager for Linux

Added to portage

2009-01-06

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 302.7 ms
system status display
Stellenangebote
Ärger mit Freenet.de