Tags: fichier,shell

Sort by: Date / Title /

  1. 3 weeks ago by cyo
    1. while read line; do
    2.   tar -P -c -T - -f archive.tar.gz
    3. done < liste_diff.txt
    4.  
    5. Le fichier fourni en paramètre contient une liste de fichiers avec pour chacun le chemin absolu sur le serveur + nom du fichier. C’est pourquoi on rajoute l’option -P (--absolute-names) à la commande tar.
    6.  
    7. ATTENTION : Il faut laisser une ligne vide au début de fichier, sinon le premier fichier de la liste n’est pas pris en compte.
    8.  
    9. Voir aussi :
    10. http://linuxfr.org/forums/30/21469.html
  2. 5 months ago by matt
    -e filename
        True if filename exists.
    -d filename
        True if filename exists and is a directory.
    -f filename
        True if filename exists and is a plain file.
    -h filename
        True if filename exists and is a symbolic link.
    -r filename
        True if filename exists and is readable.
    -w filename
        True if filename exists and is writable.
    -n string
        True if the length of string is non-zero.
    -z string
        True if the length of string is zero.
    string
        True if string is not the empty string.
    s1 = s2
        True if the strings s1 and s2 are identical.
    s1 != s2
        True if the strings s1 and s2 are not identical.
    n1 -eq n2
        True if the numbers n1 and n2 are equal.
    n1 -ne n2
        True if the numbers n1 and n2 are not equal.
    n1 -gt n2
        True if the number n1 is greater than n2.
    n1 -ge n2
        True if the number n1 is greater than or equal to n2.
    n1 -lt n2
        True if the number n1 is less than n2.
    n1 -le n2
        True if the number n1 is less than or equal to n2.
    ! expression
        Negates expression, that is, returns true iff expression is false.
    expr1 -a expr2
        True if both expressions, expr1 and expr2 are true.
    expr1 -o expr2
        True if either expression, expr1 or expr2 is true.
    ( expression )
        True if expression is true. This allows one to nest expressions.
  3. 8 months ago by cyo
    1. Crée un fichier 'sql.tar.gz' à partir de logs d’erreur 'sql-2008-03*' :
    2. tar cvfz sql.tar.gz sql-2008-03*
    3.  
    4. puis déplace le fichier dans le répertoire supérieur :
    5. mv sql.tar.gz ../
  4. sponsorised links
  5. 9 months ago by cyo
    Sous WinSCP, cette commande permet de changer les droits et le propriétaire d'un ou plusieurs fichiers et/ou répertoires : Dans le cas ci-dessus on change pour l'utilisateur 'utilisateur' et le groupe 'ftp'; puis on change les droits avec la valeur 664. Il faut bien entendu avoir les droits suffisants pour que cela fonctionne.
    1. chown utilisateur:ftp !&; chmod 0664 !&

First / Previous / Next / Last / Page 1 of 1 (4 posteets)