隐藏文件
chflags hidden filename |
显示文件
chflags nohidden filename |
文件链接
ln -s /path/to/desired-folder ~/Dropbox/desired-folder |
一只有理想的羊驼
chflags hidden filename |
chflags nohidden filename |
ln -s /path/to/desired-folder ~/Dropbox/desired-folder |
Let's call this directory 'source_dir' (where this INSTALL file is). Before starting, create another directory which we will call 'build_dir'.
Do:
cd build_dir |
The "make install" step may require administrator privileges.
You can adjust the installation destination (the "prefix") by passing the -DCMAKE_INSTALL_PREFIX=myprefix option to cmake, as is explained in the message that cmake prints at the end.
If you have a manifest file which lists all the files that were installed with make install you can run this command which I have from another answer:
cat install_manifest.txt | xargs echo rm | sh |
If you have sudo make install you will need to add a sudo to your uninstall:
cat install_manifest.txt | xargs echo sudo rm | sh |
sudo apt-get install git-core |
hexo官方推荐的安装方法是使用nvm,这里我们也使用nvm进行安装,当然你也可以使用直接安装,不过貌似nvm安装之后会直接在个人目录下产生.nvm目录并且通过.bashrc或者.bash_profile进行开机加载,然后其他的nvm操作都会保存在>.nvm目录,这样方便以后升级或者重装系统,相当于绿色软件了。
wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh |
会输出:
v4.2.6 |
然后:
nvm use 4.2.6 |
为了避免重启后找不到hexo指令的错误,在/etc/rc.local中添加:
nvm use 4.2.6 |
npm install -g hexo-cli |
可以通过ip:4000查看到默认页面。
32-Bit:
wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf - |
64-Bit:
wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - |
接着,从新建的 .dropbox-dist 文件夹运行 Dropbox 守护程序。
~/.dropbox-dist/dropboxd |
Next we will download the command line management script. This script requires Python, so make sure you have it installed. You can see if Python is installed with python -V
wget https://www.dropbox.com/download?dl=packages/dropbox.py -O dropbox_manager.py |
如果想要不同步某些文件夹,就可以:
./dropbox_manager.py exclude add ~/Dropbox/Photos/ |
Here's a sample init.d script for Debian/Ubuntu and the event.d sample.
sudo nano /etc/init.d/dropbox |
输入:
#!/bin/bash |
Set it to start automatically on system boot:
sudo chmod +x /etc/init.d/dropbox |
To start the service, run
sudo /etc/init.d/dropbox start |
To stop it, run
sudo /etc/init.d/dropbox stop |
To restart it, run
sudo /etc/init.d/dropbox restart |
You can also check running status in the Ubuntu/Debian and Gentoo versions with:
sudo /etc/init.d/dropbox status |
sudo apt-get install nginx |
写入:
server { |
如果使用了hexo-pdf插件,并且将文件放到服务器上,则还需添加:
location ~* \.(pdf)$ { |
由于nginx的运行用户没有权限访问网站所在的目录,检查[1]:
/etc/nginx/nginx.conf |
可以将user的值改为当前用户名。
重启:
service nginx restart |
http://www.leyar.me/hexo-nginx-403-forbidden/ ↩