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. sort (Unix) — Wikipédia
sort (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 sort.

Sort

Description de cette image, également commentée ci-après
sort --help
Informations
Type Utilitaire UNIX (d)Voir et modifier les données sur Wikidata

modifier - modifier le code - voir Wikidata (aide)

sort est une commande POSIX qui permet de trier des fichiers ou leurs contenus.

Par défaut, sort affiche l'ensemble des lignes des fichiers qu'on lui passe en paramètre triées par ordre croissant de la table de codage des caractères (par exemple ASCII).

Exemple

[modifier | modifier le code]
 % cat fichier1.txt
 ligne1 ligne1_fichier1
 ligne2 ligne2_fichier1
 % cat fichier2.txt 
 ligne1 ligne1_fichier2
 ligne2 ligne2_fichier2
 % sort fichier2.txt fichier1.txt     
 ligne1 ligne1_fichier1
 ligne1 ligne1_fichier2
 ligne2 ligne2_fichier1
 ligne2 ligne2_fichier2

Il est possible de s'en servir pour trier des fichiers par types et tailles :

 $ ls -al
-rwxr-xr-x 1 root   root    5000 2010-05-16 17:00 fichier1
-rwxr-xr-x 1 root   root     100 2010-05-17 17:00 fichier2
drwxr-xr-x 3 root   root    4096 2010-05-16 17:00 répertoire1
drwxr-xr-x 3 root   root    4096 2010-05-17 17:00 répertoire2
 $ ls -al | sort -n
drwxr-xr-x 3 root   root    4096 2010-05-16 17:00 répertoire1
drwxr-xr-x 3 root   root    4096 2010-05-17 17:00 répertoire2
-rwxr-xr-x 1 root   root     100 2010-05-17 17:00 fichier2
-rwxr-xr-x 1 root   root    5000 2010-05-16 17:00 fichier1
 $ ls -al | sort +4n
-rwxr-xr-x 1 root   root     100 2010-05-17 17:00 fichier2
drwxr-xr-x 3 root   root    4096 2010-05-16 17:00 répertoire1
drwxr-xr-x 3 root   root    4096 2010-05-17 17:00 répertoire2
-rwxr-xr-x 1 root   root    5000 2010-05-16 17:00 fichier1

Voir aussi

[modifier | modifier le code]

GNU Core Utilities

Liens externes

[modifier | modifier le code]
  • (fr) Page de manuel de sort
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=Sort_(Unix)&oldid=169802998 ».
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