lundi 3 novembre 2008

Ext2 attributes


chattr, lsattr : two commands that allow reading and modifying of
file attributes on an ext2 filesystem.



Example :


# chattr +i /etc/shadow


This command will put the "i" attribute (file cannot be modified. This includes deletion or renaming).

See 'man chattr' for detailed description on attributes.




CHATTR(1) CHATTR(1)

NAME
chattr - change file attributes on a Linux second extended file system

SYNOPSIS
chattr [ -RV ] [ -v version ] [ mode ] files...

DESCRIPTION
chattr changes the file attributes on a Linux second extended file sys‐
tem.

The format of a symbolic mode is +-=[ASacDdIijsTtu].

The operator ‘+’ causes the selected attributes to be added to the
existing attributes of the files; ‘-’ causes them to be removed; and
‘=’ causes them to be the only attributes that the files have.

The letters ‘acdijsuADST’ select the new attributes for the files:
append only (a), compressed (c), no dump (d), immutable (i), data jour‐
nalling (j), secure deletion (s), no tail-merging (t), undeletable (u),
no atime updates (A), synchronous directory updates (D), synchronous
updates (S), and top of directory hierarchy (T).




LSATTR(1) LSATTR(1)

NAME
lsattr - list file attributes on a Linux second extended file system

SYNOPSIS
lsattr [ -RVadv ] [ files... ]

DESCRIPTION
lsattr lists the file attributes on a second extended file system. See
chattr(1) for a description of the attributes and what they mean.


lundi 27 octobre 2008

non-root mount for external usb ext3 hard drive

J'ai récemment acquis un disque dur externe USB 2.5", que j'ai formaté en ext3.

Mauvaise surprise à l'auto-détection, il est par défaut (contrairement aux clefs usb en FAT32) mis en lecture seule pour les utilisateurs lambdas, et uniquement en lecture-écriture pour root.

Lors du formatage utilisation de :


sudo fdisk /dev/sdb1
sudo mkfs.ext3 /dev/sdb1
sudo e2label /dev/sdb1 {{snip label}}




Pour modifier le mode de montage et mettre ça dans fstab, j'ai eu recours à la commande vol_id pour trouver les paramètres.


# vol_id /dev/sdb1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID={{snip}}
ID_FS_UUID_ENC={{snip}}
ID_FS_LABEL={{snip label}}
ID_FS_LABEL_ENC={{snip}}
ID_FS_LABEL_SAFE={{snip}}



J'ajoute alors dans /etc/fstab la ligne suivante :

LABEL={{snip label}} /media/{{snip mount point}} ext3 user,auto 0 0



Ca à l'air de marcher comme il faut !!





VOL_ID(8) vol_id VOL_ID(8)

NAME
vol_id - probe filesystem type and read label and uuid

SYNOPSIS
vol_id [--export] [--type] [--label] [--label-raw] [--uuid]
[--skip-raid] [--probe-all] [--help] [device]

DESCRIPTION
vol_id is usually called from a udev rule, to provide udev with the
filesystem type, the label and the uuid of a volume. It supports most
of the common filesystem formats and detects various raid setups to
prevent the recognition of raid members as a volume with a filesystem.

dimanche 19 octobre 2008

magicrescue

http://www.student.dtu.dk/~s042078/magicrescue/

mardi 14 octobre 2008

fixps - sanitize PostScript files

Linux / Unix Command: fixps
Command Library
NAME
fixps - sanitize PostScript files
SYNOPSIS
fixps [OPTIONS] FILE
DESCRIPTION

Try to fix common PostScript problems that break postprocessing.


http://linux.about.com/library/cmd/blcmdl1_fixps.htm

Couleurs, Agave

Quelques couleurs


Tenter de faire un thème sobre phpbb à partir de ces deux couleurs :

http://www.pixenjoy.com/lharmonie-des-couleurs

# RSS Orange RSS Orange [#FF7400]
# Techcrunch green Techcrunch green [#008C00]


Voir même (triangle) :
#ff9900 orange
#00FF99 vert clair
#9900FF violet

mais je n'aime pas le vert.




agave



On peut faire joujou avec le programme «Agave» qui permet de tester des jeux de couleurs en fonction de critères prédéfinis et généralement admis comme étant de bonnes "alliances de couleurs».


http://home.gna.org/colorscheme/

man agave

NAME
Agave - colorscheme designer for the gnome desktop

SYNOPSIS
agave [options]

DESCRIPTION
Agave is a program for generating colorschemes from a starting color.
It currently supports five different colorscheme types:

[...]

vendredi 10 octobre 2008

Medibuntu packages

From : Medibuntu
Medibuntu (Multimedia, Entertainment & Distractions In Ubuntu) is a repository of packages that cannot be included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc).

Medibuntu is a packaging project dedicated to distributing software that cannot be included in Ubuntu for various reasons, related to geographical variations in legislation regarding intellectual property, security and other issues [...]




From : Ubuntu Forums : Comprehensive Multimedia & Video Howto

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

vendredi 5 septembre 2008

Access BIOS Setup menu Dell Latitude820

Ayant un joli Splashscreen à l'allumage de l'ordi, j'ai du demandé à google quelle était la combinaison de touche pour accéder au Setup du BIOS d'un Dell Latitude D820.

Résultat, il y a deux possibilité pour les Dell Latitude :


  • F2

  • Fn+F1

vendredi 29 août 2008

mount iso Ubuntu and NetBSD

Ubuntu way


$ sudo mkdir /media/iso
$ sudo mount -t iso9660 netbsd/i386cd-4.0.iso /media/iso -o loop
$ ls -la /media/iso/


NetBSD way


$ su
# vnconfig -c vnd0 /home/mark/i386cd-3.0.1.iso
# mount_cd9660 /dev/vnd0d /image/

(from : http://wiki.netbsd.se/How_to_install_NetBSD_from_an_USB_Memory_Stick )

Ubuntu /proc et usb

Par défaut sous ubuntu il semble que les périph usb ne soient pas montés dans /proc.


# mount -t usbfs /dev/bus/usb /proc/bus/usb/



sources :
http://ubuntuforums.org/showthread.php?t=622964
http://blog.linuxoss.com/2006/05/running-vmware-workstation-55-on-suse-101/

mardi 12 août 2008

cron + ssh + keychain

Keychain :



dans .bash_profile


#!/bin/bash
#example ~/.bash_profile file
/usr/bin/keychain private keys
#redirect ~/.ssh-agent output to /dev/null to zap the annoying
#"Agent PID" message
source ~/.ssh-agent > /dev/null


cron :


crontab -e :

42 4 * * * time /home/cm/usr/bin/script_sauvegarde.sh



script_sauvegarde.sh





#!/bin/bash

keychain $HOME/SSH_PRIV_KEY
source /home/cm/.keychain/MACHINE-NAME-sh

rsync -e ssh --exclude-from=RSYNC_EXCLUDE_FILE -Cavz CLIENT/ SERVER:PATH_ON_SERVER/