1 개요[ | ]
- 리눅스 ll 자연정렬, 버전정렬
-v
옵션을 붙이면 된다.
- 또는
--sort=version
이라고 써도 된다.
- 여기서는 v는 버전(version)
- 메이저/마이너 버전까지 정렬을 할 수 있다.
2 예시 1[ | ]
ll (기본 예시)
Console
Copy
root@web2:/tmp/natsort# ll
total 8
drwxr-xr-x 2 root root 4096 Dec 4 22:23 ./
drwxrwxrwt 8 root root 4096 Dec 4 22:22 ../
-rw-r--r-- 1 root root 0 Dec 4 22:22 10.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 11.txt
-rw-r--r-- 1 root root 0 Dec 4 22:23 12.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 8.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 9.txt
- → 그냥 실행하면 10번대가 앞으로 가는 사전식 정렬
ll -v (자연정렬 예시)
Console
Copy
root@zetawiki:/tmp/natsort# ll -v
total 8
drwxr-xr-x 2 root root 4096 Dec 4 22:23 ./
drwxrwxrwt 8 root root 4096 Dec 4 22:22 ../
-rw-r--r-- 1 root root 0 Dec 4 22:22 8.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 9.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 10.txt
-rw-r--r-- 1 root root 0 Dec 4 22:22 11.txt
-rw-r--r-- 1 root root 0 Dec 4 22:23 12.txt
- →
-v
옵션을 붙이면 10번대가 뒤에 오는 자연 정렬
3 예시 2[ | ]
ll (기본 예시)
Console
Copy
root@zetawiki:/tmp/versort# ll
total 8
drwxr-xr-x 2 root root 4096 Dec 4 22:32 ./
drwxrwxrwt 10 root root 4096 Dec 4 22:31 ../
-rw-r--r-- 1 root root 0 Dec 4 22:31 hello.10.10.10.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.10.9.11.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.11.11.11.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.9.11.9.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.9.9.9.txt
ll -v (버전정렬 예시)
Console
Copy
root@zetawiki:/tmp/versort# ll -v
total 8
drwxr-xr-x 2 root root 4096 Dec 4 22:32 ./
drwxrwxrwt 10 root root 4096 Dec 4 22:31 ../
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.9.9.9.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.9.11.9.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.10.9.11.txt
-rw-r--r-- 1 root root 0 Dec 4 22:31 hello.10.10.10.txt
-rw-r--r-- 1 root root 0 Dec 4 22:32 hello.11.11.11.txt
- → 버전별로 차곡차곡 정리되었다.
4 같이 보기[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- 리눅스 (19)
CentOS JDK 설치 ― …CentOS JDK 설치 ― ElliottCentOS vsftpd 설치 및 설정 ― …CentOS에서 apt-get 실행해보기 ― …CentOS에서 apt-get 실행해보기 ― 다미안VirtualBox 리눅스 인터넷 연결 ― …VirtualBox 리눅스 인터넷 연결 ― JmnoteVirtualBox 리눅스 인터넷 연결 ― …리눅스 CPU 사용률 확인 ― 동원잉리눅스 JDK 버전 확인 ― …리눅스 JDK 버전 확인 ― Jmnote리눅스 SSH 패스워드 없이 자동 로그인 ― …리눅스 SSH 패스워드 없이 자동 로그인 ― Jmnote리눅스 날짜 기준으로 파일 삭제하기 ― 백승현리눅스 날짜 기준으로 파일 삭제하기 ― Jmnote리눅스 디렉토리 용량 확인 du ― …리눅스 메모리 사용률 확인 ― 최재완리눅스 메모리 사용률 확인 ― Jmnote좀비 프로세스 찾기, 죽이기 ― 불량펭귄