63 votes

Fonctions cachées de Linux

13voto

Dave Veffer Points 933
NAME
 units -- conversion program

DESCRIPTION
 The units program converts quantities expressed in various scales to their 
equivalents in other scales.  The units program can only handle multiplicative
scale changes.  It cannot convert Celsius to Fahrenheit, for example.
It works interactively by prompting the user for input:

     You have: meters
     You want: feet
             * 3.2808399
             / 0.3048

     You have: cm^3
     You want: gallons
             * 0.00026417205
             / 3785.4118

     You have: meters/s
     You want: furlongs/fortnight
             * 6012.8848
             / 0.00016630952

     You have: 1|2 inch
     You want: cm
             * 1.27
             / 0.78740157

12voto

Kellenjb Points 131

Ce n'est pas vraiment caché, mais ça peut l'être pour ceux qui n'ont pas d'expérience, mais j'aime vraiment pouvoir donner des listes et laisser Bash les développer comme ça :

cp arq{,.bak}

ce qui revient à taper

cp arq arq.bak

J'utilise également les raccourcis de l'histoire (je ne pense pas que ce soit le bon terme, mais...) comme

!! 

pour répéter la dernière commande, ou

^foo^bar 

pour remplacer foo par bar dans la dernière commande

12voto

bobbyrcox Points 136

Ssh-copy-id pour le transfert des clés ssh. L'ancienne méthode consistait à envoyer la clé par chat via ssh et une méthode encore plus ancienne consistait à scp la clé puis à l'envoyer par chat. Si vous utilisez un port ssh non standard, ceci fera l'affaire pour vous .

ssh-copy-id -i /path/to/key '-p nonstandardport nom de l'hôte

Autre sage..

ssh-copy-id -i /path/to/key hostname

11voto

Tim Sullivan Points 10677

Consoles virtuelles. La plupart des gens savent comment utiliser (Ctrl-)Alt-F1 pour accéder à la première console, etc., mais que faire si vous en avez plus de 12 ? Vous pouvez utiliser les touches Alt-Gauche et Alt-Droite pour passer d'une console à l'autre :-D

11voto

ChrisR Points 303

J'aime le paquet debian-goodies :

Description: Small toolbox-style utilities for Debian systems
 These programs are designed to integrate with standard shell tools,
 extending them to operate on the Debian packaging system.
 .
  dgrep  - Search all files in specified packages for a regex
  dglob  - Generate a list of package names which match a pattern
 .
 These are also included, because they are useful and don't justify
 their own packages:
 .
  debget       - Fetch a .deb for a package in APT's database
  dpigs        - Show which installed packages occupy the most space
  debman       - Easily view man pages from a binary .deb without extracting
  debmany      - Select manpages of installed or uninstalled packages
  checkrestart - Help to find and restart processes which are using old
                 versions of upgraded files (such as libraries)
  popbugs      - Display a customized release-critical bug list based on
                 packages you use (using popularity-contest data)

et aussi moreutils, qui est en fait un super outil de tuyauterie sur roues :

Description: additional unix utilities
 This is a growing collection of the unix tools that nobody thought
 to write thirty years ago.
 .
 So far, it includes the following utilities:
  - sponge: soak up standard input and write to a file
  - ifdata: get network interface info without parsing ifconfig output
  - ifne: run a program if the standard input is not empty
  - vidir: edit a directory in your text editor
  - vipe: insert a text editor into a pipe
  - ts: timestamp standard input
  - combine: combine the lines in two files using boolean operations
  - pee: tee standard input to pipes
  - zrun: automatically uncompress arguments to command
  - mispipe: pipe two commands, returning the exit status of the first
  - isutf8: check if a file or standard input is utf-8
  - lckdo: execute a program with a lock held
Homepage: http://kitenet.net/~joey/code/moreutils/

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X