Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. head (Unix) — Wikipédia
head (Unix) — Wikipédia 👆 Click Here! Read More..
Un article de Wikipédia, l'encyclopédie libre.
Page d’aide sur l’homonymie

Pour les articles homonymes, voir Head.

Head

Informations
Type Utilitaire UNIX (d)Voir et modifier les données sur Wikidata

modifier - modifier le code - voir Wikidata (aide)

head est une commande UNIX qui permet d'afficher les premières lignes de texte d'un fichier ou de l'entrée standard. La syntaxe de cette commande est la suivante :

 head [options] <fichier>

Par défaut, head affiche les 10 premières lignes de son entrée sur la sortie standard. Le nombre de lignes affichées peut être changé avec une option fournie sur la ligne de commande. L'exemple suivant affiche les 20 premières lignes de fichier :

 head -n 20 ''fichier''

Celui-ci affiche les 5 premières lignes de tous les fichiers commençant par foo :

 head -n 5 ''foo*''

Plus généralement, les caractères joker « * » (pour n caractères) et « ? » (pour 1 caractère) sont acceptés dans le nom de fichier.


Certaines versions de head omettent le n. Il faut alors uniquement taper -5.

Options

[modifier | modifier le code]
-c <x nombre d'octets> Copie les x premiers octets.

Autre

[modifier | modifier le code]
  • Comme beaucoup des premières versions d'Unix n'avaient pas cette commande, les documentations et les livres utilisaient sed à la place :
 sed 5q ''foo''

Cela demande à sed d'afficher 5 lignes, puis de quitter.

  • Lorsque l'on veut visualiser la fin du fichier, il faut utiliser la commande tail.
v · m
Commandes Unix
Aide
  • uname
  • apropos
  • help
  • file
  • history
  • info
  • man
  • type
  • whatis
Environnement utilisateur
  • env
  • dmesg
  • finger
  • halt
  • id
  • init
  • logname
  • mesg
  • passwd
  • reboot
  • shutdown
  • su
  • sudo
  • talk
  • uptime
  • w
  • wall
  • who
  • whoami
  • write
Gestion de processus
  • at
  • bg
  • chroot
  • crontab
  • disown
  • exit
  • fg
  • htop
  • iowait
  • jobs
  • kill
  • nice
  • nohup
  • pkill
  • ps
  • pstree
  • sleep
  • time
  • top
Manipulation de texte
  • awk (gawk)
  • banner
  • bash
  • cat
  • clear
  • cut
  • diff
  • ed
  • ex
  • head
  • join
  • nl
  • paste
  • patch
  • read
  • sed
  • sort
  • strings
  • tail
  • tee
  • tr
  • uniq
  • vi
  • vim
  • wc
Programmation shell
  • alias
  • basename
  • dirname
  • echo
  • expr
  • false
  • printf
  • set
  • test
  • true
  • unset
  • wait
Recherche
  • find
  • grep
  • locate
  • whereis
  • which
Réseau
  • cURL
  • ethtool
  • ftp
  • host
  • ifconfig
  • mail
  • mailx
  • mii-tool
  • nc
  • netstat
  • ping
  • rlogin
  • ssh
  • sftp
  • telnet
  • traceroute
  • wget
Système de fichiers
  • cd
  • chgrp
  • chmod
  • chown
  • cp
  • dd
  • df
  • dir
  • du
  • file
  • less
  • ln
  • ls
  • lsof
  • mkdir
  • more
  • mount
  • mv
  • pwd
  • rm
  • rmdir
  • split
  • touch
  • tree
  • umask
  • umount
Divers
  • bc
  • dc
  • cal
  • date
  • fc
  • lp
  • lpr
  • md5sum
  • icône décorative Portail de l’informatique
Ce document provient de « https://fr.teknopedia.teknokrat.ac.id/w/index.php?title=Head_(Unix)&oldid=169802198 ».
Catégorie :
  • Commande Unix
Catégories cachées :
  • Page utilisant P31
  • Article utilisant une Infobox
  • Portail:Informatique/Articles liés
  • Portail:Technologies/Articles liés

  • indonesia
  • Polski
  • الرية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصر
  • Nederlands
  • 本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українска
  • Tiếng Việt
  • Winaray
  • 中文
  • Русски
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id