Find & Replace across multiple files in linux
http://rushi.wordpress.com/2008/08/05/find-replace-across-multiple-files-in-linux/
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-
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-
Labels:
ubuntu
Removing multiple files in nested directories
find /path/ -name "Q6PRD1*" | xargs rm -R
Labels:
ubuntu
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
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
Labels:
ubuntu
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
sudo ls -lR / 2>/dev/null | grep "/etc/init.d/testfile"
http://ubuntuforums.org/showthread.php?t=90970
cd
find . -lname /dataX/luudao/MS2PHdbDatas2011Nov
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
[-i identity_file] [-l limit] [-o ssh_option] [[user@]host1:]file1
[...] [[user@]host2:]file2
http://cc.in2p3.fr/docenligne/134
Labels:
ubuntu
Subscribe to:
Comments (Atom)
