0%

天文相关会议【已结束】

搜集系列相关会议,供大家参考。更好阅读体验参考原文天文会议汇总

欢迎大家补充、修改PRforkstarclone,一般一月更新一次,谢谢。

原始文件请参考 天文会议汇总

Forthcoming

即将召开的会议参考 天文会议汇总

Past Events

Begin End Title Location Website
2018-07-24 2018-07-27 中国科学数据大会 (2018)– 科学数据与人工智能 黑龙江省黑河 http://dc2018.codata.cn/
2018-08-14 2018-08-17 中国天文学会第七届青年天文论坛 新疆乌鲁木齐 http://yaf2018.csp.escience.cn/dct/page/1
2018-09-03 2018-09-07 12th DiFX Users and Developers Meeting Bad Kötzting/Wettzell, Germany http://www.fs.wettzell.de/veranstaltungen/vlbi/difx2018/difx2018.html
2018-09-14 2018-09-17 空间超长波天文学术研讨会 贵州省平塘县天文小镇 http://tianlai.bao.ac.cn/long_wave.htm
2018-09-17 2018-09-21 21cm宇宙学与天籁合作组会议 贵州省平塘县天文小镇 http://tianlai2018.csp.escience.cn/dct/page/1
2018-09-25 2018-09-29 CASPER Workshop 2018 贵阳 http://casper2018.csp.escience.cn/dct/page/1
02 October 2018 04 October 2018 GGOS Days 2018 Tsukuba, Japan http://176.28.21.212/en/meetings/2018/ggos-days/general
08 October 2018 11 October 2018 14th EVN Symposium and Users’ Meeting Granada, Spain http://evnsymp2018.iaa.es/
09 October 2018 12 October 2018 GRACE/GRACE-FO Science Team Meeting 2018 Potsdam, Germany https://www.gstm-2018.eu/
09 October 2018 12 October 2018 SIRGAS 2018 Symposium: Geocentric Reference System for the Americas Aguascalientes, Mexico http://geoweb2.inegi.org.mx/sirgas2018/html/en/index.html
2018-10-21 2018-11-1 中法2018年“实测天体物理”暑期学校 云南大学 http://www.swifar.ynu.edu.cn/info/1062/1393.htm
2018-10-22 2018-10-26 Global Radio Scintillometry Astrophysics 2018 上海交通大学 https://scintillometry-2018.github.io/
2018-10-22 2018-10-28 The BRICS Association of Gravity Astrophysics and Cosmology Durban, South Africa https://acru.ukzn.ac.za/~brics-acg/
22 October 2018 23 October 2018 Joint meeting of the ESA Topical Teams: ACES & General Relativity and ACES & Geodesy, clocks and time transfer Munich, Germany https://www.bgu.tum.de/fesg/aces/
23 October 2018 25 October 2018 The 10th Multi-Global Navigation Satellite Systems Asia Conference Melbourne, Australia https://2018.mgaconference.com.au/
2018-10-24 2018-10-27 中科院计算机网络信息中心2018年用户大会暨技术交流会 中国西安 http://cnic2018.cnic.cn/dct/page/1
2018-10-27 2018-10-31 中国天文学会2018年学术年会 云南昆明 http://2018casmeeting.csp.escience.cn/dct/page/1
29 October 2018 02 November 2018 IGS 2018 Workshop: Multi-GNSS Through Global Collaboration Wuhan, China http://igsworkshop2018.gnsswhu.cn/
2018-10-31 2018-11-01 中国天文学会第十四次全国会员代表大会 云南昆明 http://astronomy.pmo.cas.cn/qt/tzgg/201808/t20180824_423917.html
2018-11-02 2018-11-05 Sino-French ‘LIA-ORIGINS’ Workshop - From First Epochs of Matter and Galaxy Formation to Extraterrestrial Life 云南昆明 http://2018lia.csp.escience.cn/dct/page/1
03 November 2018 03 November 2018 ILRS Analysis Standing Committee Meeting Canberra, Australia
04 November 2018 06 November 2018 International Workshop on GNSS Ionosphere (IWGI2018) Shanghai, China http://202.127.29.4/geodesy/iwgi2018/
04 November 2018 09 November 2018 13th Meeting of the International Committee on Global Navigation Satellite Systems (ICG) Xi’an, China http://icg13.beidou.gov.cn/
05 November 2018 08 November 2018 International Data Week 2018: The Digital Frontiers of Global Science Gaborone, Botswana http://internationaldataweek.org/
05 November 2018 09 November 2018 21st International Workshop on Laser Ranging Canberra, Australia http://www.iwlr2018.serc.org.au/
09 November 2018 10 November 2018 31st CODATA General Assembly Gaborone, Botswana http://www.codata.org/events/general-assembly/general-assembly-2018
09 November 2018 10 November 2018 3rd Meeting of the Asia-Oceania VLBI Group for Geodesy and Astrometry (AOV) Canberra, Australia http://auscope.phys.utas.edu.au/aov/meetings/aov2018/3rdaovgm.html
12 November 2018 15 November 2018 7th International VLBI Technology Workshop Krabi, Thailand http://www.narit.or.th/en/index.php/ivtw2018
2018-11-12 2018-11-16 The life and times of the Milky Way - The symbiosis between Gaia and ground-based spectroscopic surveys 上海 http://gaia2018.csp.escience.cn/dct/page/1
19 November 2018 21 November 2018 First United Nations World Geospatial Information Congress Deqing, Zhejiang Province, China http://ggim.un.org/meetings/2018-1st_Congress_Deqing
2018-11-14 2018-11-17 第一届空间地球科学学术研讨会 海南三亚 http://sess2018.csp.escience.cn/dct/page/1
2018-11-21 2018-11-25 中国虚拟天文台与天文信息学2018年学术年会 江西景德镇 http://www.china-vo.org/events/cvo2018/index.html
2018-11-22 2018-11-23 2018中国SKA科学大会 上海市 http://skachina2018.csp.escience.cn/dct/page/1
2018-12-03 2018-12-04 2018年度北京大学科维理天体物理论坛 - 中国未来地面天文设备展望 北京大学 http://kiaa.pku.edu.cn/astroforum18/
2018-12-10 2018-12-13 IEEE BigData 2018 Seattle, WA, USA http://cci.drexel.edu/bigdata/bigdata2018/index.html
08 October 2018 10 October 2018 9th OPTICON Gaia Science Alerts workshop Vipava, Slovenia https://www.ast.cam.ac.uk/ioa/wikis/gsawgwiki/index.php/Workshop2018:main
10 December 2018 14 December 2018 AGU 2018 Fall Meeting Washington, D.C., USA https://fallmeeting.agu.org/2018/
28 January 2019 31 January 2019 ION Precise Time and Time Interval Meeting (PTTI) Reston, VA, USA🇺🇸 https://www.ion.org/ptti/index.cfm
29 January 2019 30 January 2019 Second Asia SKA Initiative On Neutron Star (ASIONS) meeting Kantary Hills, Chiang Mai, Thailand https://indico.narit.or.th/event/96/
12 February 2019 15 February 2019 NZ SKA Forum 2019 Auckland University of Technology (AUT), New Zealand https://irasr.aut.ac.nz/news-And-events2/news-And-events/nz-ska-forum-2019
14 March 2019 16 March 2019 VLBI Training School Las Palmas de Gran, Spain🇪🇸 http://www.oan.es/evga2019/index.shtml
17 March 2019 19 March 2019 24th Meeting of the European VLBI group for Geodesy and Astrometry(EVGA) Las Palmas de Gran, Spain🇪🇸 http://www.oan.es/evga2019/index.shtml
20 March 2019 18th IVS Analysis Workshop Las Palmas de Gran, Spain🇪🇸 http://www.oan.es/evga2019/index.shtml
25 March 2019 29 March 2019 2019 Santa Barbara Gaia Sprint Santa Barbara, CA, USA🇺🇸 http://gaia.lol/2019SB.html
2019-04-01 2019-04-03 首届东陆天体物理论坛-大规模巡天时代:近场宇宙学和时域天文 云南昆明🇨🇳 http://www.mephisto.ynu.edu.cn/intro_Donglu.html
April 2019 IGS 2019 Analysis Workshop Potsdam, Germany🇩🇪 TBA
3 April 2019 5 April 2019 SKA History Meeting Jodrell Bank, UK🇬🇧 https://indico.skatelescope.org/event/518/
07 April 2019 12 April 2019 EGU General Assembly 2019 Vienna, Austria🇦🇹 http://www.egu2019.eu/
08 April 2019 12 April 2019 ESLAB #53: The Gaia Universe Noordwijk, The Netherlands🇳🇱 https://www.cosmos.esa.int/web/the-gaia-universe/
08 April 2019 12 April 2019 SKA General Science Meeting and Key Science Workshop 2019 “New Science enabled by New Technologies in the SKA Era” Alderley Park in Alderley Edge (Mon, Tue, Wed), and the new SKA Headquarters (Thu, Fri) at Jodrell Bank🇬🇧 https://indico.skatelescope.org/event/467/
09 April 2019 12 April 2019 European Navigation Conference 2019 (ENC 2019) Warsaw, Poland🇵🇱 http://enc2019.eu/
15 April 2019 17 April 2019 Eating VLBI workshop 2019 “East Asia to Italy: Nearly Global VLBI” Bologna,CNR Research area,Italy🇮🇹 https://sites.google.com/a/inaf.it/eating-vlbi-workshop-2019/home
2019-04-18 2019-04-22 2019年射电天文前沿与技术研讨会 贵州平塘🇨🇳 http://crat2019.csp.escience.cn/dct/page/1
22 April 2019 26 April 2019 FIG Working Week 2019 Hanoi, Vietnam🇻🇳 http://www.fig.net/fig2019/
01 May 2019 31 May 2019 24th EVGA Working Meeting & 20th IVS Analysis Workshop [exact dates TBD] Las Palmas de Gran Canaria, Spain🇪🇸 TBA
13 May 2019 17 May 2019 ESA Living Planet Symposium Milan, Italy🇮🇹 https://lps19.esa.int/QuickEventWebsitePortal/living-planet-symposium-2019/website
05 May 2019 09 May 2019 Tenth IVS Technical Operations Workshop Westford, MA, USA🇺🇸 https://www.haystack.mit.edu/workshop/TOW2019/Index.html
22 May 2019 24 May 2019 EUREF 2019 Symposium Tallinn, Estonia🇪🇪 TBA
29 May 2019 31 May 2019 East Asia SKA Science Workshop2019 Shanghai, China🇨🇳 http://eassw2019.csp.escience.cn/dct/page/1
2019-06-02 2019-06-05 2019年VLBI科学技术及应用研讨会 西安市临潼区🇨🇳 http://vlbi2019.csp.escience.cn/dct/page/1
10 June 2019 14 June 2019 Zooming in on Star Formation Nafplio, Greece🇬🇷 https://indico.nbi.ku.dk/event/1055/
2019-06-10 2019-06-21 The Xth International Pulsar Timing Array (IPTA) workshop Pune, India🇮🇳 https://conf.ncra.tifr.res.in/event/2/
2019-06-11 2019-06-13 110米口径全向可动射电望远镜前沿科学与技术研讨会 新疆乌鲁木齐🇨🇳 http://973-2019.csp.escience.cn/dct/page/1
12 June 2019 14 June 2019 PASC19 ETH Zurich, Switzerland🇨🇭 https://pasc19.pasc-conference.org/
2019-06-17 2019-06-20 The 41st PIERS Rome,Italy意大利 http://piers.org/piers2019Rome/
June 25 2019 June 27 2019 Radio/Millimeter Astrophysical Frontiers in the Next Decade University of Virginia, Inn at Darden, Charlottesville, VA https://web.cvent.com/event/113b66a4-48cd-4881-a098-ed5820c65813/summary
2019-06-26 2019-06-28 FAST/Future Pulsar Symposium 8 陕西西安🇨🇳 http://www.phy.pku.edu.cn/~FPS/FPS8/FPS8.html
08 July 2019 18 July 2019 27th IUGG General Assembly Montreal, Canada🇨🇦 http://iugg2019montreal.com/
2019-07-05 2019-07-07 第二届全国大数据与人工智能科学大会 云南昆明🇨🇳 http://csiam-bd-ai.csp.escience.cn/dct/page/1
2019-07-10 2019-07-15 2019年度分子云与恒星形成研讨会 新疆阿勒泰🇨🇳 http://2019mcandsf.csp.escience.cn/dct/page/1
2019-07-14 2019-07-18 中国天文学会第12届张衡学术研讨会 新疆乌鲁木齐🇨🇳 http://zhangheng2019.csp.escience.cn/dct/page/65540
2019-07-22 2019-07-24 The 4th International Conference on Lunar and Deep Space Exploration (LDSE) 珠海市🇨🇳
2019-08-21 2019-08-23 第六届中国科学数据大会-科学数据与重大科研基础设施 贵州省贵阳市🇨🇳 http://dc2019.csp.escience.cn/dct/page/1
28 July 2019 02 August 2019 AOGS 16th Annual Meeting Singapore🇸🇬 http://www.asiaoceania.org/aogs2019/
9 August 2019 11 August 2019 BigCom 2019 - The 5th International Conference on Big Data Computing and Communications Qing Dao, China🇨🇳 http://staff.ustc.edu.cn/~bigcom2019/index.html
2019-09-06 2019-09-10 中国天文学会2019年学术年会 青海省海西州德令哈市🇨🇳 http://2019casmeeting.csp.escience.cn/dct/page/1
16 Sep 2019 20 Sep 2019 ION GNSS+ 2019 Miami, Florida, USA🇺🇸 TBA
2019-09-19 2019-09-20 CODATA 2019: Towards next-generation data-driven science: policies, practices and platforms Beijing,China🇨🇳 http://www.codata.org/events/conferences/codata-2019-beijing
2019-09-23 2019-09-27 12th East Asian VLBI Workshop Ibaraki,Japan🇯🇵 http://vlbi.sci.ibaraki.ac.jp/eavw19/
7 October 2019 11 October 2019 ERIS 2019 - European Radio Interferometry School Gothenburg, Sweden https://www.chalmers.se/en/researchinfrastructure/oso/events/ERIS2019/Pages/default.aspx
01 October 2019 30 November 2019 The Earth’s Time Varying Rotation: A Centennial Celebration TBA TBA
2019-10-14 2019-10-17 SKA-VLBI Key Science Projects and Operations Workshop Jodrell Bank Observatory,United Kingdom https://indico.skatelescope.org/event/539/
2019-11-01 2019-11-04
国天文学会行星科学与深空探测前沿研讨会暨中科院行星科学重点
实验室和月球与行星科学国家重点实验室 2019 年联合学术年会
四川成都🇨🇳
01 November 2019 30 November 2019 14th Meeting of the International Committee on Global Navigation Satellite Systems (ICG) [exact dates TBD] India🇮🇳 TBA
2019-11-11 2019-11-15 The 13th DiFX Users and Developers Workshop Melbourne🇦🇺 http://astronomy.swin.edu.au/research/conferences/difx2019/
2019-11-18 2019-11-20 8th International VLBI Technology Workshop Sydney 🇦🇺 https://www.atnf.csiro.au/ivtw19/
2019-11-25 2019-11-28 The SKA System Design, Operations & Plans 上海🇨🇳 https://indico.skatelescope.org/event/551/
2019-11-27 2019-12-01 中国虚拟天文台与天文信息学2019年学术年会 黑龙江大庆市🇨🇳 http://www.china-vo.org/events/cvo2019/index.html
09 December 2019 13 December 2019 AGU 2019 Fall Meeting San Francisco, CA, USA🇺🇸 TBA

IBM 收购 Redhat && 咏远有李

时光像指尖的沙漏,不留情面滴匆匆滑落,重阳、霜降马上就要立冬了。

看起来今年好像已经接近尾声了。

经历了春的娇艳/夏的火热/秋的繁华,在冬日的暖阳中又开始喋喋不休了。

今天去办事的时候读到两个消息,一个是蓝色巨人IBM斥资340亿美元收购Linux巨头Red Hat,这应该是今年Microsoft收购Github后的有一个重磅消息,也是开源市场有史以来的最大一次交易,看来free is not free;另一个就是李咏,咏哥是我比较喜欢的主持人,仔细算算好像是真的好久没有见到他了,愿他安息,一路走好,也希望医学界继续能给患者们带来一些福音。

也是在工作中碰到一些需要Linux GNU Build System,所以花了一些时间研究了一下相关内容,絮絮叨叨一些基本够用的知识,其他的做为非主文也是基本够了,OK,是时候开始下一段旅程了….

安装 Parseltongue

下载源码包

MacOSX 安装

1
2
brew install http://www.jive.nl/parseltongue/releases/obit.rb
brew install http://www.jive.nl/parseltongue/releases/parseltongue.rb

Ubuntu安装

1
2
3
$ sudo add-apt-repository ppa:kettenis-w/parseltongue
$ sudo apt-get update
$ sudo apt-get install parseltongue

源码安装

1
2
3
4
5
$ tar zxvf parseltongue-x.x.tar.gz
$ cd parseltongue-x.x
$ ./configure --with-obit=/usr/lib64/obit --prefix=/the/path/you/want/to/install
$ make
$ make install

使用conda

1
2
3
conda create --name python27 python=2.7
conda activate python27
conda install -c kettenis parseltongue

代码参考 https://www.github.com/shaoguangleo/radio_astronomy

探索网络信息的利器 whois

在网络的世界中,虚虚实实,真真假假,了解域名、IP地址的所有者信息是至关重要的。
Linux系统也提供了一个强大的工具whois,它能够查询并展示域名、IP地址的注册信息、所有者以及其他相关细节。

什么是whois命令?

whois是一个用于查询互联网资源的命令行工具。
通过whois命令,用户可以获取关于域名、IP地址和AS号码(Autonomous System Number,自治系统号码)等网络资源的注册信息。
这些信息包括域名的所有者、注册商、注册日期、过期日期等重要数据。

如何使用whois命令?

在Linux终端中,使用whois命令非常简单。

  1. 查询域名信息

    1
    whois example.com

    这将显示example.com域名的注册信息,包括注册商、注册日期、过期日期等。

  2. 查询IP地址信息

    1
    whois 8.8.8.8

    这将显示IP地址8.8.8.8的注册信息,提供该IP地址的所有者和注册信息。

  3. 通过管道和grep过滤需要的信息

    1
    whois example.com | grep "Registrar"

    通过管道和grep命令,可以筛选出包含特定关键词(如”Registrar”)的信息,使查询结果更易读。

注意事项

  • whois提供的信息可能因注册商、注册政策等因素而有所不同,不一定是100%准确的。
  • 有些注册商对whois查询设置了限制,可能会要求输入验证码或限制查询次数。

Windows下的软件 msys2

Software Distribution and Building Platform for Windows

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

详细的参考:

https://www.msys2.org/

Windows下的客户端软件 cmder

Cmderconemumsysgitclink打包在一起,解压即可使用无需配置。可以在 官网 下载。

下载的时候,有两个版本,分别是minifull版;唯一的差别在于有没有内建msysgit工具,这是Git for Windows的标配。我们的Linux子系统中工具齐全,所以下载mini版即可。

cmder 添加到右键菜单

cmder 加到环境变量,然后打开一个cmder命令行窗口,ctrl+T,勾选 Run as administrator,点击Start就打开了一个管理员权限的终端,在新终端中输入以下命令,就可以使用右键打开cmder窗口了。

1
Cmder.exe /REGISTER ALL

设置启动 cmder 时直接运行 bash

打开一个cmder窗口,

1
点击右下角的目录按钮——>Settings——>Startup——>Command line,输入“bash -cur_console:p

遍历总线设备 lspci

.. note::
东风夜放花千树。更吹落、星如雨
辛弃疾 - 青玉案·元夕

lspci命令用于显示PCI总线的信息,以及所有已连接的PCI设备信息。

官方定义为:

lspci - list all PCI devices

默认情况下,lspci会显示一个简短的设备列表。 使用使用一些参数来显示更详细的输出或供其他程序解析的输出。

不过需要注意的是,在许多操作系统上,对 PCI 配置空间的某些部分的访问仅限于 root,因此普通用户可用的 lspci 功能受到限制。

使用方法为:

1
$ lspci [options]

其中常用的三个选项为:

  • -n 以数字方式显示PCI厂商和设备代码
  • -t 以树状结构显示PCI设备的层次关系
  • -v 显示更详细的输出信息

显示当前主机的所有PCI总线信息:

默认无参数的显示

1
2
3
4
5
6
7
8
9
10
11
$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:04.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 0 (rev 02)
00:04.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 1 (rev 02)
00:04.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 2 (rev 02)
......

以数字方式显示PCI厂商和设备代码

以数字形式显示

1
2
3
4
5
6
7
8
9
10
$ lspci -n
00:00.0 0600: 8086:2f00 (rev 02)
00:01.0 0604: 8086:2f02 (rev 02)
00:02.0 0604: 8086:2f04 (rev 02)
00:03.0 0604: 8086:2f08 (rev 02)
00:03.2 0604: 8086:2f0a (rev 02)
00:04.0 0880: 8086:2f20 (rev 02)
00:04.1 0880: 8086:2f21 (rev 02)
00:04.2 0880: 8086:2f22 (rev 02)
......

同时显示数字方式还有设备代码信息

1
2
3
4
5
6
7
8
9
10
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 [8086:2f00] (rev 02)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 [8086:2f02] (rev 02)
00:02.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 [8086:2f04] (rev 02)
00:03.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 [8086:2f08] (rev 02)
00:03.2 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 [8086:2f0a] (rev 02)
00:04.0 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 0 [8086:2f20] (rev 02)
00:04.1 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 1 [8086:2f21] (rev 02)
00:04.2 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 2 [8086:2f22] (rev 02)
......

以树状结构显示PCI设备的层次关系:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ lspci -t
lspci -t
-+-[0000:ff]-+-08.0
| +-08.2
| +-1f.0
| \-1f.2
+-[0000:80]-+-01.0-[81]----00.0
| +-04.0
| +-05.1
| +-05.2
| \-05.4
+-[0000:7f]-+-08.0
| +-08.2
| +-0c.1
\+-0c.2

真假转换之间 tr

.. note::
假作真时真亦假,无为有处有还无。
曹雪芹《红楼梦》

Linux tr 命令用于转换或删除字符。

tr 命令可以从标准输入读取数据,经过字符串转译后,将结果输出到标准输出。

官方定义为:

tr - translate or delete characters

使用方法为:

1
$ tr [OPTION]... SET1 [SET2]

其中常用的三个选项为:

  • -d, --delete:删除指令字符
  • [:lower:] :所有小写字母
  • [:upper:] :所有大写字母
  • [:blank:] :所有空格

a-z小写全部转换为大写

默认无参数的显示

1
2
3
4
5
6
$ echo "Hello World, Welcome to Linux!" | tr a-z A-Z
HELLO WORLD, WELCOME TO LINUX!

# 还有一种方法
$ echo "Hello World, Welcome to Linux!" | tr [:lower:] [:upper:]
HELLO WORLD!

A-Z大写全部转换为小写

默认无参数的显示

1
2
3
4
5
6
$ echo "Hello World, Welcome to Linux!" | tr  A-Z a-z
hello world, welcome to linux!

# 还有一种方法
$ echo "Hello World, Welcome to Linux!" | tr [:upper:] [:lower:]
hello world, welcome to linux!

貌似起名可以用这个

很多变量或者函数起名字都会移除元音字符,可以考虑使用-d参数,如下:

1
2
$ echo "Hello World, Welcome to Linux!" | tr -d a,o,e,i
Hll Wrld Wlcm t Lnux!

不过感觉删除的多了,也不一定是好事。。。

比如里外看Wlcm不晓得啥意思

移除文件中的所有空格

同理,使用-d,结合[:blank:]可以快速删除所有空格。

1
2
$ echo "Hello World, Welcome to Linux!" | tr -d [:blank:]
HelloWorld,WelcometoLinux!

快速确定CentOS/RHEL的系统版本

你是否清楚的知道目前你使用的CentOS/RHEL的系统版本呢?

或许你认为系统版本对你而言不是很重要,不过如果涉及到bug修改,驱动支持,软件配置的问题,你就需要很清楚的知道到底属于哪个发行版,内核版本是多少了。

对于系统管理员这个问题可能比较简单,如果你是个小白,给你提供几个方法来快速确定吧。

uname命令

1
2
3
4
$ uname -or
3.10.0-693.17.1.el7.x86_64 GNU/Linux
$ uname -a
Linux local 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$uname$主要用于打印系统的信息,其中$-a$表示打印所有信息,$-or$表示打印操作系统和内核版本信息。

RPM命令

$RPM$为$Red\ Hat\ Package\ Manager$的缩写,是类Redhat系统普遍使用的软件包管理程序,我们可以使用它来确定CentOS/RHEL的发行版本。

1
2
$rpm --query centos-release/redhat-release
centos-release-7-4.1708.el7.centos.x86_64

hostnamectl命令

1
2
3
4
5
6
7
8
9
10
$ hostnamectl
Static hostname: local
Icon name: computer-server
Chassis: server
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-693.17.1.el7.x86_64
Architecture: x86-64

lsb_release命令

lsb_release命令显示一些$LSB$ (Linux Standard Base)和发行信息。

如果这个命令找不到,可能需要安装一下yum install redhat-lsb

1
2
$ lsb_release -d
Description: CentOS Linux release 7.4.1708 (Core)

通过查看系统文件

上面的一些命令都是通过检索系统的一些信息来得到,我们也可以通过系统本身的文件直接获取,如下所示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

$ cat /etc/system-release
CentOS Linux release 7.4.1708 (Core)

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"