NUMFMT(1) Cac cau lnh NUMFMT(1) TEN numfmt - Convert numbers from/to human-readable strings TOM TT numfmt [TUY-CHN] [S] MO T Dnh dng li S, hoc con s t du vao tieu chun nu khong ch ra cai nao. Tuy chn dai yeu cu di s thi tuy chn ngn cung vy. --debug hin th cac cnh bao du vao khong hp l -d, --delimiter=X dung X thay vi khong trng d phan tach cac trung --field=CAC_TRUNG thay th con s trong nhng trung du vao (mc dnh la 1) xem CAC_TRUNG ben dui --format=DNH-DNG s dng DNH-DNG du chm dng cho ham printf(1); xem DNH-DNG phia dui d co them thong tin chi tit --from=UNIT h s bin-di-t-dng thanh UNIT; mc dnh la "none". xem UNIT dui day --from-unit=N ch ra kich thuc don v du vao (thay vi gia tr 1 theo mc dnh) --grouping s dng vung-da-phuong-da-dnh-nghia d nhom ch s, vi d 1,000,000 (co nghia la khong chu nh hung vung da phuong C/POSIX) --header[=N] in ra (ma khong chuyn di) N dong du tien; N mc dnh la 1 nu khong ch dnh ro rang --invalid=CH_D ch d sai: no co th la: abort (mc dnh), fail, warn, ignore --padding=N dm kt xut N ky t; N duong s can-phi; N am can-trai; vic dm them s b b qua nu kt xut rng hon N; mc dnh la t dng dm them nu khong trng duc tim thy --round=PHUONG_THC dung PHUONG_THC d lam tron khi bin di t l; PHUONG_THC co th la: up, down, from-zero (mc dnh), towards-zero, nearest --suffix=HU-T them HU-T cho con s du ra, va chp nhn HU-T tuy chn trong con s du vao --to=UNIT con s cho bin di t l t dng ap dng cho UNIT; xem UNIT ben dui --to-unit=N kich thuc don v kt xut (thay cho gia tr mc dnh la 1) -z, --zero-terminated b phan tach dong la NUL, khong phi ky t dong mi --help hin th tr giup nay ri thoat --version dua ra thong tin phien bn ri thoat Cac tuy chn v DON-V (UNIT): none khong ap dng bin di t l t dng; cac hu t s coi li auto chp nhn tuy chn hu t don/hai ky t: 1K = 1000, 1k = 1000, 1Ki = 1024, 1M = 1000000, 1Mi = 1048576, si chp nhn hu t la mt ky t don: 1k = 1000, 1K = 1000, 1M = 1000000, ... iec chp nhn hu t la mt ky t don: 1K = 1024, 1k = 1024, 1M = 1048576, ... iec-i chp nhn tuy chn hu t dng hai-ky-t: 1Ki = 1024, 1ki = 1024, 1Mi = 1048576, ... Phm vi trung kiu cut(1) duc h tr la: N Byte, ky t hoc trung th N dm t 1 N- T byte, ky t hoc trung th N dn cui dong N-M T byte, ky t hoc trung th N dn M (tinh c M) -M T byte, ky t hoc trung du tien dn th M (tinh c M) - Mi trung Da vung/trung co th ngan cach bng du phy DNH-DNG phi phu hp cho vic hin th tham s du chm dng "%f". Tuy chn trich dn (%'f) s bt --grouping (nu no duc h tr bi min da phuong hin hanh). Tuy chn d rng (%10f) s dm them khi kt xut. Tuy chn d rng vi s khong (%010f) s dm bng s khong. Tuy chn d rng vi gia tr am (%-10f) s can l trai. Tuy chn d chinh xac (%.1f) s de len d chinh xac do tim t du vao. Trng thai thoat la 0 nu tt c cac con s du vao du duc chuyn di. Theo mc dinh, numfmt s dng ti noi xy ra li chuyn di du tien vi trng thai thoat la 2. Co tuy chn --invalid="fail" cnh bao s dua ra khi co cac li chuyn di xy ra va thoat vi trng thai la 2. Co tuy chn --invalid="warn" mi li chuyn di duc coi la sai, nhung trng thai thoat la 0. Tuy chn --invalid="ignore" li chuyn di khong duc chun doan va thoat vi trng thai la 0. VI D $ numfmt --to=si 1000 -> "1.0k" $ numfmt --to=iec 2048 -> "2.0K" $ numfmt --to=iec-i 4096 -> "4.0Ki" $ echo 1K | numfmt --from=si -> "1000" $ echo 1K | numfmt --from=iec -> "1024" $ df -B1 | numfmt --header --field 2-4 --to=si $ ls -l | numfmt --header --field 5 --to=iec $ ls -lh | numfmt --header --field 5 --from=iec --padding=10 $ ls -lh | numfmt --header --field 5 --from=iec --format %10f TAC GI Vit bi Assaf Gordon. THONG BAO LI Tr giup trc tuyn GNU coreutils: Report any translation bugs to BN QUYN Copyright (C) 2024 Free Software Foundation, Inc. Giy phep GPL pb3+ : Giy phep Cong cng GNU phien bn 3 hay sau . Day la phn mm t do: bn co quyn sa di va phat hanh li no. KHONG CO BO HANH GI C, vi diu khin duc phap lut cho phep. XEM THEM Tai liu dy d co ti: hoc sn co ni b thong qua: info '(coreutils) numfmt invocation' DCH Bn dch ting Vit ca trang hung dn nay do thc hin. Bn dch nay la Tai liu Min phi; dc Giy phep Cong cng GNU Phien bn 3 hoc mi hon d bit cac diu khon bn quyn. Chung toi cho rng KHONG CO TRACH NHIM PHAP LY. Nu bn tim thy mt s sai sot trong bn dch ca trang hung dn nay, vui long gi thu dn TODO <>. GNU coreutils 9.5 Thang 8 nam 2024 NUMFMT(1)