Linux命令之bc – 浮点计算器、进制转换

4,297浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

用途说明

Bash内置了对整数四则运算的支持,但是并不支持浮点运算,而bc命令可以很方便的进行浮点运算,当然整数运算也不再话下。手册页上说bc是An arbitrary precision calculator language,即一个任意精度的计算语言,注意是一种语言,它提供了一些语法结构,比如条件判断、循环等,可以说是很强大的,但是我在实际中还没有找到需要这个用途的场合 。另外一个用途就是用来进行进制转换。

继续阅读“Linux命令之bc – 浮点计算器、进制转换”

linux mail命令用法

2,930浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

在这里整理一下Linux中mail命令的使用。mail也是一个常用的命令,我们在很多地方都要用到它,比如定时把系统状况或日志发送到我们的邮箱里等等。

首先通过help参数来查看mail的所有参数如下:

Usage: mail [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]
[-r from-addr] [-h hops] [-A account] [-R reply-addr] to-addr …
mail [-BDeHiInNRv~] [-T name] [-A account] -f [name]
mail [-BDeinNRv~] [-A account] [-u user]

继续阅读“linux mail命令用法”

常用查看Linux系统信息命令

2,230浏览
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
Loading...
系统
# uname -a               # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue   # 查看操作系统版本
# cat /proc/cpuinfo      # 查看CPU信息
# hostname               # 查看计算机名
# lspci -tv              # 列出所有PCI设备
# lsusb -tv              # 列出所有USB设备
# lsmod                  # 列出加载的内核模块
# env                    # 查看环境变量

Linux查看用户所属组

4,725浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

查看某一用户所属哪个组,用id命令,id -gn 用户名,如查看test用户所属哪个组如下:

id -gn test

如果是查看当前用户所属组,则后面的用户名可以省去,直接用id -gn即可。

Dolphins and broncos? What kind of place is this? It’s the National Football League, where gridiron warriors head to battle each Sunday under the banners of falcons, ravens, panthers and other fearsome and noble beasts. Animals of the NFL premieres in the United States on the National Geographic Channel Friday, January 24 at 8ET/PT, when James Brown of FOX’s NFL Sunday takes a look at the animals behind the logos and http://www.cheapjordan13.com finds out how their lives in the wild may be related to the play of their football namesakes.If he hits hard, you Wholesale China Jerseys keep moving you stay away, we’re not going to brawl the brawler. We’re going to. Ask him if he wants to quit. Do you want to quit? No. No? No. Did he want to quit before he came back to this corner? Did you want to quit before you came in? Alright, we all set? Is he ready to go back out there? We’re set. Hey, Bobby Larew. We’re just about out of our pike dive. We’ve talked about the upper body, we’ve talked about the head and the arms. Let’s talk about the legs and the feet when you’re coming out of a pike dive, and what you should be doing with them, okay. This is definitely one of the most unbreakable. In a four to five man rotation, most pitchers won’t even see this many starts in a career, let alone manage this lofty total. In the current climate even a 300 game winner will soon be a rarity. Fortunately, this also will spare a pitcher the ability to accumulate Cy’s 316 losses another unbreakable feat.Find a friend who can lend you a Fake Oakleys Cheap battery charger for a car battery. Do some wholesale jerseys china reading on how to connect and disconnect a battery charger safely. (Charging a battery creates hydrogen gas. Creating a spark near that href=”http://cheapjerseysupply.com/” target=”_blank”>cheap jerseys can cause a violent very injurious explosion.) In a few hours it will be fine.During the 1990s, we launched a boycott of Snapple beverages after learning that it was a major cheap china jerseys sponsor of Rush Limbaugh’s radio show. While the boycott was, admittedly, poorly conceived and hastily put together, we were nonetheless stunned when people approached us and announced almost gleefully that they now intended to purchase Snapple products even though they had never purchased them in the past. Why? Because we had told them not to. Go figure.Burpees Stand with your knees bent and with both hands on the ground. Move both legs backwards into a push up position. Replica ray bans Immediately bring both knees towards your chest and stand up. This entire motion should be done as quickly as possible. Try to perform this for 30 seconds with 1 minute rest for 5 minutes.

Linux打包命令tar

3,638浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

tar是一个在Linux系统中很常用的文件打包命令,它可以将多个文件或目录打包成一个文件,在此过程中,还可以结合gzip、bzip2等压缩命令在打包过程中对文件进行压缩以减少打包成的文件大小。

运行命令tar –help可以查看tar的参数帮助说明,有一些主要的参数:

参数 说明
-c 创建一个新的档案文件
-r 将文件增加到档案文件的尾部
-t 列出档案文件的内容
-u 将更新的文件而不是复制新增到档案文件中
-x 从档案文件中提取出文件
-j 通过bzip2进行压缩/解压缩
-z 通过gzip进行压缩/解压缩
-v 在压缩/解压缩的过程中,将正在处理的文件名显示出来
-f 后面接被处理的文件名

继续阅读“Linux打包命令tar”

linux修改ssh端口

6,578浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

SSH默认端口是22,但正式环境下这个端口号往往都需要修改,改起来也很简单。

vi /etc/ssh/sshd_config,找到Port 22,然后将端口22改为你想要的端口号,重启SSH服务:/etc/init.d/sshd restart即可,然后测试ssh连接:

ssh localhost -p 你的端口号,连接成功。

继续阅读“linux修改ssh端口”