Section courante

A propos

Section administrative du site

 Système d'exploitation  Installation  Utilisation  Tutoriel  Programmation  Outils  Annexe  Aide 
Amiga
Apple
CP/M / DOS
CoCo
Cray
Mainframe
Mobile
OS/2
TRS-80
UNIX
Windows
Autres
AmigaDOS
AmigaOS
MorphOS
Apple DOS
System 1.0
System 1.1
System 2.0
System 3.0
System 3.1
System 3.2
System 3.3
System 4.0
System 4.1
System 4.2
System 4.3
System 6.0
System 7.0
System 7.1
System 7.5
System 7.6
Mac OS 8.0
Mac OS 8.1
Mac OS 8.5
Mac OS 8.6
Mac OS 9.0
Mac OS 9.1
Mac OS 9.2
Mac OS X
Mac OS X Server
Apple DOS
Caldera DR-DOS 7
CP/M
CP/M-80
CP/M-86
DOS
DR-DOS
FreeDOS
IBM DOS 4
IBM DOS 5
MS-DOS
PC DOS
PTS-DOS
DR-DOS 5
DR-DOS 6
DR-DOS 7
MS-DOS 1.25
MS-DOS 2.0
MS-DOS 2.11
MS-DOS 3.0
MS-DOS 3.20
MS-DOS 3.21
MS-DOS 3.3
MS-DOS 4
MS-DOS 5
MS-DOS 6
MS-DOS 6.2
MS-DOS 7.10
PC DOS 1.0
PC DOS 1.1
PC DOS 2.0
PC DOS 2.1
PC DOS 3.0
PC DOS 3.1
PC DOS 3.2
PC DOS 3.3
PC DOS 4.0
PC DOS 4.01
PC DOS 5.0
PC DOS 6.1
PC DOS 6.3
PC DOS 7.0
PC DOS 2000
FLEX
OS-9
COS
UNICOS
OpenVMS
OS/390
OS/400
VAX/VMS
z/OS
Android OS
Bada
EPOC
PalmOS
Citrix Multiuser
eComStation
OS/2 Version 1
OS/2 Version 1.1
OS/2 Version 1.2
OS/2 Version 1.3
OS/2 Version 2
OS/2 Version 2.1
OS/2 Warp 3
OS/2 Warp 4
LDOS
MultiDOS
NEWDOS
TRSDOS
AIX
FreeBSD
HP-UX
Linux
QNX
SkyOS
Solaris (SunOS)
UNIX
XENIX
ReactOS
Windows 95
Windows 98
Windows Me
Windows NT 4.0 Server
Windows 2000 Professionnel
Windows 2000 Server
Windows XP
Windows Server 2003
Windows Server 2003 R2
Windows Server 2008
Windows Server 2008 R2
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
Windows Server 2019
Windows Vista
Windows 7
Windows 8
Windows 10
Windows 11
FLEX
KolibriOS
Inferno
Medos-2
Oberon
Plan 9
p-System
RDOS
CentOS
Corel Linux 1.2
Debian GNU/Linux 7.5
Lindows 4.0.302
openSUSE 11.2
Red Hat Linux 9.0
Red Star Desktop 3.0
TurnKey Core
Ubuntu 9.10
CentOS 6.5
CentOS 7
Installer Python 2.7 pour utilisateur unique sous CentOS 5.8
Introduction
Références des distributions
Références des commandes
Références des fichiers
CentOS
Debian
Fedora
openSUSE
Red Hat Linux
Slackware
TurboLinux
Ubuntu
Utilitaire
Niveau
Catégorie
Déterminer la version
Copier des répertoires
Les partitions
Les groupes
C pour Linux
Pascal pour Linux
AWK
BASH
C Shell
Free Pascal
MySQL
Perl
Python
TCL
Yabasic
Interruption 80h
MobaXterm
putty
Ext2, Ext3 & Ext4
Base de connaissances
Bibliographie
Préface
Notes légal
Dictionnaire
Recherche

curl

Client URL
Linux Externe

Syntaxe

curl [options] [URL...]

Description

Cette commande permet de transférer des données vers ou d'un serveur en utilisant un des protocoles supportés (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP ou FILE).

Remarques

Exemples

L'exemple suivant permet de vérifier de façon brute si le serveur «memcache01.mondomaine.com» de «memcached» répond :

curl telnet://memcache01.mondomaine.com:11211

Ensuite on tape la commande :

statsENTER

on obtiendra un résultat semblable suivant s'il répond (sinon il ne retournera rien) :

STAT pid 3584
STAT uptime 3068522
STAT time 1385139252
STAT version 1.4.3
STAT pointer_size 64
STAT rusage_user 84.157206
STAT rusage_system 68.807539
STAT curr_connections 5
STAT total_connections 7
STAT connection_structures 6
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 12
STAT bytes_written 773
STAT limit_maxbytes 1073741824
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 0
STAT curr_items

L'exemple suivant permet de vider le cache de memcached :

curl telnet://serveur:11211

Ensuite on tape :

flush_allEnter

On reçoit la réponse du serveur

OK

Ensuite on tape une deuxième fois la même commande :

flush_allEnter

On reçoit la réponse du serveur

OK

Finalement, on termine la communication :

quitEnter

L'exemple suivant permet d'afficher le IP publique qu'utilise mon serveur de l'Internet :

curl ifconfig.me

on obtiendra un résultat semblable à ceci :

55.44.33.22

Voir également

Système d'exploitation - Linux - Références de commandes et de programmes - wget

PARTAGER CETTE PAGE SUR
Dernière mise à jour : Samedi, le 14 novembre 2015