Using the Linux area command

Uncategorized

The place settings in Linux systems help make sure that info like dates and times are shown in a format that makes good sense in the context of where you live and what language you speak. Here’s how to use them.NOTE: None

of the commands explained in this post will alter your area settings. Some simply utilize a different place setting to show the response you might be seeing from a different location.List your settings If you’re in the United States, you need to see something like this when you use the place command to list your settings:$area LANG=en_US. UTF-8 LC_CTYPE=”en_US. UTF-8″LC_NUMERIC=”en_US. UTF-8″ LC_TIME=”en_US. UTF-8″ LC_COLLATE=”en_US. UTF-8″ LC_MONETARY=”en_US. UTF-8″ LC_MESSAGES=”en_US. UTF-8″ LC_PAPER=”en_US. UTF-8″ LC_NAME=”en_US. UTF-8″ LC_ADDRESS=”en_US. UTF-8″ LC_TELEPHONE=”en_US. UTF-8″ LC_MEASUREMENT=”en_US. UTF-8″ LC_IDENTIFICATION=”en_US. UTF-8″ LC_ALL=

The en_US. UTF-8 settings in the above output all represent US English. If you remain in France, this response is most likely:

LANG=fr_FR. utf-8 LC_CTYPE=”fr_FR. utf8″ LC_NUMERIC=”fr_FR. utf8″ LC_TIME=”fr_FR. utf8″ LC_COLLATE=”fr_FR. utf8″ LC_MONETARY=”fr_FR. utf8″ LC_MESSAGES=”fr_FR. utf8″ LC_PAPER=”fr_FR. utf8″ LC_NAME=”fr_FR. utf8″ LC_ADDRESS=”fr_FR. utf8″ LC_TELEPHONE=”fr_FR. utf8″ LC_MEASUREMENT=”fr_FR. utf8″ LC_IDENTIFICATION=”fr_FR. utf8″ LC_ALL=fr_FR. utf8

Hundreds of lines of output will be shown if you utilize the location -a (list all locations) command since it notes locales from around the world.

$ area -| wc -l 869

Here’s a sample:

$ location -| column|head -10 aa_DJ es_CO. iso88591 ms_MY. utf8 aa_DJ. iso88591 es_CO. utf8 mt_MT aa_DJ. utf8 es_CR mt_MT. iso88593 aa_ER es_CR. iso88591 mt_MT. utf8 aa_ER@saaho es_CR. utf8 my_MM aa_ER. utf8 es_CU my_MM. utf8 aa_ER.utf8@saaho es_CU. utf8 nan_TW aa_ET es_DO nan_TW@latin aa_ET. utf8 es_DO. iso88591 nan_TW. utf8 af_ZA es_DO. utf8 nan_TW.utf8@latin

Like the en_US settings revealed above, these codes, stand for the language and county (e.g., aa_DJ means Afar, Djibouti). You can show a total list with a command like the following that selects the parts on lines prior to the periods and limits the output to one of each before organizing the listing in columns:

$ location -| grep “.”|awk -F.’ ‘|uniq|column aa_DJ ca_FR es_DO is_IS nhn_MX st_ZA aa_ER ca_IT es_EC it_CH niu_NU sv_FI aa_ET ce_RU es_ES it_IT niu_NZ sv_SE af_ZA chr_US es_GT iu_CA nl_AW sw_KE agr_PE ckb_IQ es_HN ja_JP nl_BE sw_TZ ak_GH cmn_TW es_MX japanese nl_NL szl_PL am_ET crh_UA es_NI kab_DZ nn_NO ta_IN an_ES csb_PL es_PA ka_GE no_NO ta_LK anp_IN cs_CZ es_PE kk_KZ nr_ZA tcy_IN ar_AE C es_PR kl_GL nso_ZA te_IN ar_BH cv_RU es_PY km_KH oc_FR tg_TJ ar_DZ cy_GB es_SV kn_IN om_ET the_NP ar_EG da_DK es_US kok_IN om_KE th_TH ar_IN de_AT es_UY ko_KR or_IN ti_ER ar_IQ de_BE es_VE korean os_RU ti_ET ar_JO de_CH et_EE ks_IN pa_IN tig_ER ar_KW de_DE eu_ES ku_TR pap_AW tk_TM ar_LB de_IT fa_IR kw_GB pap_CW tl_PH ar_LY de_LI ff_SN ky_KG pa_PK tn_ZA ar_MA de_LU fi_FI lb_LU pl_PL to_TO ar_OM doi_IN fil_PH lg_UG ps_AF tpi_PG ar_QA dsb_DE fo_FO li_BE pt_BR tr_CY ar_SA dv_MV fr_BE lij_IT pt_PT tr_TR ar_SD dz_BT fr_CA li_NL quz_PE ts_ZA ar_SS el_CY fr_CH ln_CD raj_IN tt_RU ar_SY el_GR fr_FR lo_LA ro_RO ug_CN ar_TN en_AG fr_LU lt_LT ru_RU uk_UA ar_YE en_AU fur_IT lv_LV ru_UA unm_US as_IN en_BW fy_DE lzh_TW rw_RW ur_IN ast_ES en_CA fy_NL mag_IN sah_RU ur_PK ayc_PE en_DK ga_IE mai_IN sa_IN uz_UZ az_AZ en_GB gd_GB mai_NP sat_IN ve_ZA az_IR en_HK gez_ER mfe_MU sc_IT vi_VN be_BY en_IE gez_ET mg_MG sd_IN wa_BE bem_ZM en_IL gl_ES mhr_RU se_NO wae_CH ber_DZ en_IN gu_IN mi_NZ sgs_LT wal_ET ber_MA en_NG gv_GB miq_NI shn_MM wo_SN bg_BG en_NZ hak_TW mjw_IN shs_CA xh_ZA bhb_IN en_PH ha_NG mk_MK sid_ET yi_US bho_IN en_SC he_IL ml_IN si_LK yo_NG bho_NP en_SG hif_FJ mni_IN sk_SK yue_HK bi_VU en_US hi_IN mn_MN sl_SI yuw_PG bn_BD en_ZA hne_IN mnw_MM sm_WS zh_CN bn_IN en_ZM hr_HR mr_IN so_DJ zh_HK bo_CN en_ZW hsb_DE ms_MY so_ET zh_SG bo_IN …

Source

Leave a Reply

Your email address will not be published. Required fields are marked *