linux
jacklinping
这个作者很懒,什么都没留下…
展开
-
linux命令-rsync
rsync 常用命令rsync -avz root@remoteserver:/temp/ /local/server/ #cp all the content of temp from remoteserver to localserver rsync -avz --exclude=/temp/logs --exclude=/temp/data root@re...原创 2016-01-11 14:42:39 · 65 阅读 · 0 评论 -
linux命令-mknod
个人觉得linux的软件设计思想异常强大,比如把所有的设备都当做文件来处理,大大简化了程序员的负担,向提出这个思想的大神s致敬!!先来看看linux系统中设备管理的基本知识: 我们的linux操作系统跟外部设备(如磁盘、光盘等)的通信都是通过设备文件进行的,应用程序可以打开、关闭、读写这些设备文件,从而对设备进行读写,这种操作就像读写普通的文件一样easy。linux为不...原创 2016-02-15 14:42:38 · 218 阅读 · 0 评论 -
parted
parted 和 fdisk 的 区别 ,parted 的分区表是gpt,fdisk 是msdos ; parted 支持 2TB 以上的分区,而 fdisk 只支持 2TB 以内的。parted 使用parted -l 相当于 fdisk -lmktable gpt # 创建 gpt分区表mkpart primary 0% 100% #把整块硬盘的容量分配给该分区...原创 2016-03-19 14:05:08 · 127 阅读 · 0 评论 -
查看硬件温度
# sudo apt-get install lm-sensors# sensorscoretemp-isa-0000Adapter: ISA adapterCore 0: +31.0°C (high = +80.0°C, crit = +96.0°C)Core 1: +33.0°C (high = +80.0°C, crit = +96.0°C)...原创 2016-03-22 13:18:03 · 941 阅读 · 0 评论 -
QQ的文件路径
~/.deepinwine/qqintl/drive_c/Program\ Files/Tencent/QQIntl/Users/491620456/FileRecv/A\ Byte\ of\ Python中文教程.pdf (here file name:A Byte of Python 中文教程.pdf)原创 2016-03-23 16:56:42 · 289 阅读 · 0 评论 -
shell 整型变量定义
4.8 定义整型变量命令declare -i用带选项-i 的declare 命令,可以使变量具有整数(integer)属性。Bash 本质上只有字符型变量,但通常也可以说:定义整型变量。例如,希望得到45+20 的整数运算结果: $ M=45+20 $ echo $M 45+20 执行M=45+20 之后,M 的值为字符串45...原创 2016-03-23 19:50:46 · 11475 阅读 · 0 评论 -
序列号
YC592-8VF55-M81AZ-FWW5T-WVRV0原创 2018-04-19 11:42:29 · 175 阅读 · 0 评论 -
linux命令-at 定时执行任务
#atq 列出 at 的任务#atrm n 删除任务号为n的任务# at 时间 1.at 具体时间# at 18:00at> echo "at executed" > /home/jack/at.outat> #################### Ctrl + Djob 15 at Wed Dec 30 18:00:00 2015HH:MM...原创 2015-12-30 19:25:18 · 121 阅读 · 0 评论 -
调整nice 值
1。改变一个已经存在的进程的nice值# renice -15 25858 ;( 把 pid 为25858 的nice 值 改为 -15 )这时 PRI 的值 为 PRI(new)= PRI(old)+ (-15) PRI 的值越小 进程的 优先级越高 2。以某个nice值运行进程# nice -n -15 process...原创 2015-12-28 16:06:28 · 1625 阅读 · 1 评论 -
为什么我在tty1下中文显示不出来
先安装 sudo apt-get install fbterm运行 sudo fbterm 就能看到中文了,不过要root权限的原创 2015-11-13 10:11:29 · 1662 阅读 · 0 评论 -
mount -a failed
$ mount -a 输出 /dev/sdc1 already mounted or /dir busy原先 有四个硬盘,后来拿掉了一个 /dev/sdc,/dev/sdd 还在。重启 之后,由于原来的/dev/sdc 不在了,所以之前的/dev/sdd 就 成了/dev/sdc 了,之前在/etc/fstab 里 的 /dev/sdd1 /dir ext4 default 1...原创 2015-11-18 11:21:07 · 959 阅读 · 0 评论 -
No package ×××××× available. 错误:无须任何处理
yum install epel-release原创 2016-11-05 12:16:38 · 8612 阅读 · 1 评论 -
timestamp to date [ 及date 相关的 命令]
linux shell convert timestamp to date$ date --date='1447897489'2015年 11月 19日 星期四 09:44:49 CST-----------------------------------------------------------------$ date -d now +%Y%m%d20151126 ...原创 2015-11-26 11:46:17 · 136 阅读 · 0 评论 -
误删/usr/bin 下的所有文件
误删/usr/bin 下的所有文件 咋办?这里面的文件都是一些程序的执行文件,没了它,好多命令都没用,比如 last,ssh 等等solution:用u盘 到其他的相同系统的/usr/bin ,把这个目录下的所有的东西 考到u盘,当然u盘的文件系统可能是fat 或ntfs 有些链接文件拷不出来,跳过,把能拷的考出来。再把u盘插到服务器,这时会发现在/media下没看到u盘。不要...原创 2015-12-02 17:34:01 · 2719 阅读 · 0 评论 -
unix2dos 和 dos2unix
windows 的 doc 文件 是以 “/n /r” 换行的linux 的文件是以 “/n” 换行的为了让这两种文件能够兼容使用 需要 转化一下,一下 todos 和 fromdos 就能完成这个任务$ sudo apt-get install tofrodos上述命令 安装了 todos 和 fromdos 两个程序todos 相当于 unix2dos fromd...原创 2015-12-04 11:43:42 · 147 阅读 · 0 评论 -
添加用户并加入组
usermod -a -G groupA user #把 user 添加进 groupA 组 (一定要加 -a 不然 user 就只是groupA组了) usermod -a -G sudo jack 这样 jack 就有sudo 权限了----------------------------------------------------- 查看某用户属于哪几个组#...原创 2015-12-04 16:12:36 · 155 阅读 · 0 评论 -
ssh 登录的提示界面定制
ssh 登录欢迎界面如下:Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-37-generic x86_64) * Documentation: https://help.ubuntu.com/ System information as of Fri Dec 4 19:27:24 CST 2015 System ...2015-12-04 19:47:18 · 1034 阅读 · 0 评论 -
sudo: must be setuid root
执行sudo 提示 sudo: must be setuid root执行下面的就ok$ chmod 4755 /usr/bin/sudo-rwsr-xr-x 1 root root 70K 3月 13 2015 sudo*-rws 中的 s 代表 SUID(set user id)原创 2015-12-05 12:16:17 · 108 阅读 · 0 评论 -
shell 常用命令
1。read -s -p "input passwd:" passwd # -s:输入密码,不会在屏幕 显示 。-p:赋值给 passwd变量。。。-t 5:五秒后自动退出。-n1:输入一个字符自动退出。(适合 [Y/N])读行:cat test | while read line //cat 命令的输出作为read命令的输入,read读到的值放在line中...原创 2015-12-07 09:53:45 · 92 阅读 · 0 评论 -
crontab -e 报permission deneied
原因是 crontab 属于root组,本来因该属于crontab组才对的,-rwxr-xr-x 1 root root 35896 6月 20 2012 /usr/bin/crontabsolution切换到root用户root@imedev3:~# chown root.crontab /usr/bin/crontabroot@imedev3:~# chmod g+...原创 2015-12-21 15:44:45 · 820 阅读 · 0 评论 -
ubuntu 改变 系统语言
imeadmin@imeadmin:~$sudo vim /etc/default/locale 英文环境:LANG=en_US.UTF-8LANGUAGE="en_US:en"中文环境:LANG=zh_CN.UTF-8LANGUAGE="zh_CN:zh"改完后重启 reboot-------------------远程登入时---------------...原创 2015-11-03 10:23:06 · 84 阅读 · 0 评论