一年一度的Airshow,纠结了一下还是出发了~ 😀
两个可以替代Partition Magic的免费软件
推荐两个Partition Magic的替代软件
可动态调整分区大小,分区,格式化什么的就更不在话下了。
PS:如果你用SSD的话,记得分区对齐。
怎样创建一个只允许FTP登录的Linux用户
Here are steps to setup a user and allow the user access only via FTP (i.e. no SSH) and also limit access to a specific (user home) directory on proftpd:
1. Add new user: adduser newusername
2. Set password: passwd newusername
3. Modify user home directory from default to a new folder:
usermod -d /target/directory username
4. Edit shells file: vi /etc/shells and add /dev/null at the end
5. Modify newusername entry in the passwd file: vi /etc/passwd to add /./ before the newusername so that the entry looks like this:
newusername:x:502:502::/home/ftp/./newusernamehomedirectory/:/dev/null
6. Edit /etc/proftpd/proftpd.conf file and uncomment the line DefaultRoot ~
怎样遍历目录找到包含特定字串的文件
grep -rnw '/path/to/somewhere/' -e 'pattern'
-ror-Ris recursive,-nis line number, and-wstands for match the whole word.-l(lower-case L) can be added to just give the file name of matching files.
Along with these, --exclude, --include, --exclude-dir flags could be used for efficient searching:
- This will only search through those files which have .c or .h extensions:
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern" - This will exclude searching all the files ending with .o extension:
grep --exclude=*.o -rnw '/path/to/somewhere/' -e "pattern" - For directories, it’s possible to exclude a particular directory(ies) through
--exclude-dirparameter. For example, this will exclude the dirs dir1/, dir2/ and all of them matching *.dst/:grep --exclude-dir={dir1,dir2,*.dst} -rnw '/path/to/somewhere/' -e "pattern"
This works very well for me, to achieve almost the same purpose like yours.
For more options check man grep
Ubuntu Boot分区满的处理办法
sudo apt-get clean
sudo apt autoremove –purge
sudo apt-get autoremove –purge
sudo purge-old-kernels
sudo apt autoremove
Ocean City Air Show 2017
主机换到Vultr
用了三年多了DigitalOcean,最近发现Vultr的性价比更高,速度更快。
还犹豫什么?换!
目前感觉速度还不错~ 有海外虚拟机需求的朋友可以关注了。
怎样将动画gif转成mp4
今天刚好有这个需求研究了一下,发现ffmpeg就可以实现。
$ ffmpeg -f gif -i infile.gif outfile.mp4
Mark一下
国内公共DNS服务器
还在用ISP给的DNS?有没发现一些网站上不去了?
试试下面几个公共DNS服务器:
- DNSPod
首选:119.29.29.29
备选:182.254.116.116 - 114DNS
首选:114.114.114.114
备选:114.114.114.115 - 阿里DNS首选:223.5.5.5
备选:223.6.6.6 - DNS派
首选(电信/移动/铁通):101.226.4.6
备选(电信/移动/铁通):218.30.118.6首选(联通):123.125.81.6
备选(联通):140.207.198.6 - 百度DNS
首选:180.76.76.76 - 电信:
首选:222.172.200.68
备选:61.166.150.123
怎样分离MP4中的音频为MP3
如果碰上一些MP4中的音乐特别好听的,想转成MP3的话怎么办?
用ffmpeg就可以实现:
ffmpeg -i a.mp4 b.mp3
还可以加 -b:a 192k 来指定码率
更多参数可参照:https://trac.ffmpeg.org/wiki/Encode/MP3

