Linux Command Line
咸鱼酱
没有
展开
-
Linux learn awk and sed to a minimal limit (Keep Updating)
1 Introduction My work mostly focuses on natural language processing, which means I spend lots of time dealing with text files. From the bottom of my heart (maybe not right), I believe the cleansing p...原创 2018-10-12 06:52:06 · 335 阅读 · 0 评论 -
Linux cannot connect to X server
I want to use wb_view on remote server and view it from local client. However, when I use ssh user@localhost to login to the server, it reports errors as following. wb_view: cannot connect to X server...原创 2018-11-26 02:36:46 · 3956 阅读 · 0 评论 -
Linux: the fastest way to view images from the terminal
It is extremely easy to view images from your personal PC, however, if you are in a server without root privilege, you will need some tricks to view images. Here are the fastest way: Enter the folder...原创 2018-11-26 01:14:20 · 161 阅读 · 0 评论 -
A Record of Ubuntu apt
1. Get a list of repositories apt-get is checking grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/* 2. Remove a repository Remove it from sources.list. If it was added by add-apt-reposito...原创 2018-11-08 06:06:56 · 191 阅读 · 0 评论 -
Ubuntu Files Permissions - chmod
Original Article: https://www.linux.org/threads/file-permissions-chmod.4124/ Linux has inherited from UNIX the concept of ownerships and permissions for files. This is basically because it was conceiv...转载 2018-11-02 05:55:11 · 412 阅读 · 0 评论 -
Linux remove the files whose names match a certain pattern
Use find command to find all of the files first find . -name '*.jpg If the files shown are exactly the ones that you want, you can delete them with the following command: find . -name '*.orig' #-del...原创 2018-10-23 06:02:57 · 175 阅读 · 0 评论 -
Linux文本搜索
寻找特定文件名的命令 find /path/to/search -name "fileofinterest.txt" 在文件夹下就内容的关键词进行查询,摘自 How do I find all files containing specific text on Linux? Do the following: grep -rnw '/path/to/somewhere/' -e 'pattern...转载 2018-10-10 06:11:46 · 623 阅读 · 0 评论 -
Linux 深度学习训练log debug工作流
程序运行输出重定向: 这里我使用的脚本是./translate_enzh_train.sh,根据具体情况修改这个。一般会结合nohup或者disown使用。 ./translate_enzh_train.sh 1>>suc.txt 2>>err.txt 对Log进行实时观测 watch -n 10 tail -n 15 err.txt 每10秒就在屏幕上打印输出log...原创 2018-10-09 23:36:33 · 637 阅读 · 0 评论 -
Linux Vim 分屏使用小记
Open multiple screens: :split /path/to/file split the screen vertically with original file and new file Switch between different screens: Control+W followed by W to toggle between open windows and, Co...原创 2018-10-09 23:00:39 · 216 阅读 · 0 评论 -
Linux后台运行程序命令
将命令在后台运行最常见的是nohup命令,这里不赘述,具体可参考: https://www.jianshu.com/p/fcc8894923f7 而最常发生的是,我们直接运行了一个命令,但是没有使用nohup,后期又希望能够让这个程序在后台运行,即使关闭了当前的terminal,程序也能如旧运行,这个时候往往需要 ctrl+z bg disown 关于disown的细节可参考: https:/...原创 2018-10-09 22:21:10 · 1415 阅读 · 0 评论 -
Linux查看CPU信息以及其他
查看当前系统内核信息 uname -a 查看当前操作系统发行版信息 Ubuntu 18.04.1 LTS \n \l 查看CPU型号 cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c You can get: 4 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz Interpret th...原创 2018-10-09 01:54:05 · 924 阅读 · 0 评论 -
ubuntu设置主屏和副屏
作为一个程序员,从开始使用双屏之后,一个显示屏开发,那种感觉,就是不好。好吧,刚换到ubuntu,笔记本一个显示屏,外接了一个HDMI的显示器,由于书桌的位置,只有把HDMI的显示屏放在笔记本的左边。但是,默认的,是笔记本的显示屏是主屏,右边是外接的显示屏,一种乱了套的感觉。 想去左边的屏,需要往右滑,想去右边的屏,需要往左滑。不过还好有 xrandr,试了一下,三条命令: venn@sprin...转载 2018-12-12 04:43:55 · 705 阅读 · 0 评论