Dienstag, 26. Februar 2013

Batch copy mit SFTP

es muss der public der der QuellMaschine auf der Zielmaschine
unter /root/.ssh/authorized_keys abgelegt werden

sftp -b ~/commands.sftp user@domain.tld

commands.sftp:

cd /dir1
mput *.123
mput *.456
quit


konvertieren von PDF in JPG

convert -geometry 600  -quality 90 name.pdf  name.jpg

nim erstellen von mksysb

nim -o define -t mksysb -a server=master -a location=/export/images/hostname_mksysb -a mk_image=yes -a source=hostname beschreibung

mehrsprachige QT-Programme mit kDevelop erstellen




main.cpp

#include
#include "helloworld.h"
#include
#include


int main(int argc, char** argv)
{
    QApplication app(argc, argv);

    QString locale = QLocale::system().name();
    QTranslator translator;
    translator.load(QString("helloworld_") +locale);
    app.installTranslator(&translator);
    helloworld foo;
    foo.show();
    return app.exec();
}


helloworld.cpp

#include "helloworld.h"

#include
#include
#include
#include


helloworld::helloworld()
{

    QLabel* l = new QLabel( this );
    l->setText(tr( "Hello World!" ));
    setCentralWidget( l );
    QAction* a = new QAction(this);
    a->setText(tr( "&Quit" ));
    connect(a, SIGNAL(triggered()), SLOT(close()) );
    menuBar()->addMenu(tr( "&File" ))->addAction( a );
}

helloworld::~helloworld()
{}

#include "helloworld.moc"


helloworld.h

#ifndef helloworld_H
#define helloworld_H

#include

class helloworld : public QMainWindow
{
Q_OBJECT
public:
    helloworld();
    virtual ~helloworld();
};

#endif // helloworld_H



helloworld.pro

SOURCES      = main.cpp helloworld.cpp
TRANSLATIONS = helloworld_de.ts



developer@localhost:~/projects/helloworld> lupdate helloworld.pro


linguist öffnen und die Datei: helloworld_de.ts laden

dann die Übersetzung machen.

Datei -> Freigeben

Die datei: helloworld_de.qm nach build im Projektverzeichnis kopieren.

Dann sollte das Helloworld in deutsch starten
wenn die Variable LANG auf de_DE.UTF-8 steht






mounten von ISO an LPAR

$ mkrep -sp rootvg -size 5G

$ mkvopt -name mini-powerpc64.iso -file mini-powerpc64.iso

$ lsrep

$ mkvdev -fbo -vadapter vhost5

$ loadopt -disk mini-powerpc64.iso -vtd vtopt0

Mittwoch, 3. Oktober 2012

HMC Commandline

IBM HMC (Hardware Managment Console)
Wer lieber Commandline statt die WebGUI nutzen will
hier nur ein paar wenige Kommandos

 
ssh hscroot@

> vtmenu          =          für öffnen von Consolenfenstern auf LPAR
                                   hier kann man auch nach den SERVER-SYSTEM-NAMEN schauen

> chsysstate -r lpar -m -o on -f -b sms -n

starten einer LPAR ins SMS MENU


> chsysstate -r lpar -m -o on -f -n

starten einer LPAR

> chsysstate -r lpar -m -o shutdown --immed -n

ausschalten einer LPAR



> lssyscfg -m -r lpar

infos über die LPARs auf dem SERVER-SYSTEM abfragen


> lspartition -ix -dlpar

dlpar Infos abfragen von alle SERVER-SYSTEMEN

> lshwres -r virtualio --rsubtype eth --level lpar -m

MAC Adressen
Status Abfrage LPAR ein oder ausgeschaltet






Dienstag, 14. August 2012

leerzeichen aus dateinamen entfernen

bash: for i in *\ *;do mv "$i" "${i// /_}";done