Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

cut : sélection de colonnes

La commande cut présente 2 formes suivant que l'on sélectionne des colonnes de caractères ou qu'on distingue des champs séparés par un caractère précis.

sélection_colonne
cut -c(sélection_colonnes) [fichiers]
Exemples

affiche le 5ième caractère
cut -c5 fichier
affiche du 5ième au 10ème caractères
cut -c5-10 fichier
affiche le 5ième et le 10ème caractères
cut -c5-10 fichier
affiche à partir du 5ième (jusqu'à la fin)
cut -c5- fichier

sélection champs
cut -d(séparateur) -f(sélection_champs) [fichiers]

http://ww2.ac-creteil.fr/reseaux/systemes/linux/shell-scripts/filtres.html#cut


For me:
grep ">" omim_20111015.fasta | cut -c2-

Removing multiple files in nested directories

find /path/ -name "Q6PRD1*" | xargs rm -R

Using Standard Input and Output

http://linuxdevcenter.com/pub/a/linux/lpt/13_01.html

Sed - Delete one or more lines from a file

http://en.kioskea.net/faq/1451-sed-delete-one-or-more-lines-from-a-file

How to create and extract a .tar.gz archive using command line

One of the most common compression formats used in GNU/Linux and variants is tar.gz. A tar.gz file is nothing but a gzipped tar archive. These days users of GNU/Linux system seldom have to use the command line to create or extract tar.gz archives. But it is a useful command to keep in your arsenal if you are a system administrator.

To create a tar.gz archive from a given folder you can use the following command

tar -zcvf tar-archive-name.tar.gz source-folder-name

This will compress the contents of source-folder-name to a tar.gz archive named tar-archive-name.tar.gz

To extract a tar.gz compressed archive you can use the following command

tar -zxvf tar-archive-name.tar.gz

This will extract the archive to the folder tar-archive-name.


http://www.zyxware.com/articles/2009/02/26/how-to-create-and-extract-a-tar-gz-archive-using-command-line

find all symbolic links

sudo find / -lname /etc/init.d/testfile

sudo ls -lR / 2>/dev/null | grep "/etc/init.d/testfile"

http://ubuntuforums.org/showthread.php?t=90970


cd
find . -lname /dataX/luudao/MS2PHdbDatas2011Nov

HowTo SSH/SCP without a password

http://www.hostingrails.com/HowTo-SSH-SCP-without-a-password

la commande scp

scp [-pqrvBC1246] [-F ssh_config] [-S program] [-P port] [-c cipher]
[-i identity_file] [-l limit] [-o ssh_option] [[user@]host1:]file1
[...] [[user@]host2:]file2

http://cc.in2p3.fr/docenligne/134