
linux
在路上的咸鱼
~~~
展开
-
Linux下解压文件名乱码问题
unzip -O GBK filename乱码主要是因为windows系统下zip压缩默认编码是GBK而Linux是UTF-8。原创 2017-06-11 19:55:57 · 1529 阅读 · 0 评论 -
dumps unicode
sample code: import json json_string = json.dumps(“ברי צקלה”) print json_string “\u05d1\u05e8\u05d9 \u05e6\u05e7\u05dc\u05d4” The problem: it’s not human readable. My (smart) users want to verify or ...转载 2019-04-02 20:50:09 · 729 阅读 · 0 评论 -
gdrive使用
https://www.howtoing.com/how-to-access-google-drive-from-linux-gdrive原创 2019-03-03 19:36:05 · 1981 阅读 · 0 评论 -
SFTP入门指南
By 华华 - 十二月, 5th 2015 什么是 SFTP ? 在了解 SFTP 之前,我们先看看什么是 FTP 。FTP( File Transfer Protocol )文件传输协议,是一种常用来在两终端系统之间传输文件的方法。 SF...转载 2018-07-07 07:11:48 · 2042 阅读 · 0 评论 -
乱码转换
txt文件在Windows下可以正常显示,Ubuntu下打开文件乱码。这是中文编码问题,Windows下用的是gb2312,而linux下用的是utf8。在此提供5种解决方案: 在文档所在目录运行命令 iconv -f gb2312 -t utf8 -c 1.txt > 2.txt 选项-c的作用是忽略不能识别的字符,继续向后转换。否则iconv遇到不能识别的字符就终止转换。 ic...转载 2018-04-11 23:08:44 · 20941 阅读 · 0 评论 -
Linux 爬坑记录
添加快捷方式 安装了eclipse但是没有启动图标: gedit /usr/share/applications/eclipse.desktop 然后为eclipse配置 [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=/home/yexu/eclipse/eclipse //...原创 2017-05-01 01:51:21 · 366 阅读 · 0 评论 -
linux挂载操作
开机自动挂载vi /etc/fstab这个文件保存着开机自动挂载的配置。 挂载的格式:<file system> <mount point> <type> <options> <dump> <pass>手动挂载 mountmount mount -t 文件系统 文件名 挂载点 挂载光盘时,简单起见,可以直接mount /dev/sr0 挂载点。 挂载U盘时,先查看设备文件名,一原创 2018-02-25 15:35:44 · 711 阅读 · 0 评论 -
linux压缩命令
zip压缩zip file.zip file zip -r file.zip directory解压unzip fiel.zipgz压缩gzip file #压缩之后删除源文件 gzip -c file > file.gz #提取压缩结果到文件 gzip -r dir #压缩目录下的子文件解压gzip -d file.gz #解压 gunzip file.gz -c, –stdout原创 2018-02-23 03:01:45 · 884 阅读 · 0 评论 -
ubuntu开机启动
个人的修改位置Ubuntu有非常多的方式让程序开机自启,这里记录一下我的位置。vi /etc/rc.local内容大概如下:#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on s原创 2018-02-22 04:17:54 · 423 阅读 · 0 评论 -
ubuntu下没有/var/log/message
默认这一段是被注释掉的:*.=info;*.=notice;*.=warn;\ auth,authpriv.none;\ cron,daemon.none;\ mail,news.none -/var/log/messages 打开就好了,暂时没有找到为什么ubuntu默认不开启日志信息,可能太占空间?原创 2017-07-14 23:18:40 · 2677 阅读 · 0 评论 -
ssh
ssh copy id ssh-keygen ssh-copy-id -i ~/.ssh/id_rsa.pub name@host 如果你有多个服务器的话, # zsh 写入命令 function ssh2(){ cmd="ssh name@子网."$1 eval $cmd } 以后只需要ssh2 101就会自动帮你登录了。 ...原创 2019-06-24 11:13:30 · 110 阅读 · 0 评论