at712 发布的文章
linux复制指定目录下的全部文件到另一个目录中,linux cp 文件夹
linux复制指定目录下的全部文件到另一个目录中
复制指定目录下的全部文件到另一个目录中
文件及目录的复制是经常要用到的。linux下进行复制的命令为cp。
假设复制源目录 为 dir1 ,目标目录为dir2。怎样才能将dir1下所有文件复制到dir2下了
如果dir2目录不存在,则可以直接使用
cp -r dir1 dir2
即可。
mysql 时区-时间转换
时区(timezone)转换函数:convert_tz(dt,from_tz,to_tz)
select convert_tz('2008-08-08 12:00:00', '+08:00', '+00:00'); -- 2008-08-0804:00:00 SELECT CONVERT_TZ(CURDATE(), '+08:00', '+00:00')
css3中calc在less编译时被计算的解决办法
对于前端er来说,Less或Sass已经是一项必备的基本技能,有了这个利器,可以省下前端开发者的很多编码时间,让你写CSS如行云流水一般,然后最近我在Less里加入calc时确发现了有点问题,我在Less中这么写:
div {width : calc(100% - 30px);}
根据屏幕大小,加载不同大小的图片
今天要介绍的东西,很简单,但是对于前端响应式的时候是个很重要的知识; 我们在用bootstrap这类前端框架时, 虽然页面局部通过media query实现了,页面始终无滚动条,响应式页面。 但是,bootstrap里面的img-responsive类只是通过设置图片100%, 并没有真正的实现在手机上和电脑端加载不同大小的图片。
执行apt-get install 报错:Errors were encountered while processing
dpkg: warning: files list file for package 'libquadmath0:amd64' missing; assuming package has no files currently installed (Reading database ... 79 files and directories currently installed.) Preparing to unpack .../dovecot-imapd_1%3a2.1.7-7+deb7u1_amd64.deb ... Unpacking dovecot-imapd (1:2.1.7-7+deb7u1) ... Selecting previously unselected package dovecot-lmtpd. Preparing to unpack .../dovecot-lmtpd_1%3a2.1.7-7+deb7u1_amd64.deb ... Unpacking dovecot-lmtpd (1:2.1.7-7+deb7u1) ... Selecting previously unselected package dovecot-pop3d. Preparing to unpack .../dovecot-pop3d_1%3a2.1.7-7+deb7u1_amd64.deb ... Unpacking dovecot-pop3d (1:2.1.7-7+deb7u1) ... Setting up dovecot-imapd (1:2.1.7-7+deb7u1) ... dpkg: error processing package dovecot-imapd (--configure): subprocess installed post-installation script returned error exit status 10 Setting up dovecot-lmtpd (1:2.1.7-7+deb7u1) ... dpkg: error processing package dovecot-lmtpd (--configure): subprocess installed post-installation script returned error exit status 10 Setting up dovecot-pop3d (1:2.1.7-7+deb7u1) ... dpkg: error processing package dovecot-pop3d (--configure): subprocess installed post-installation script returned error exit status 10 Errors were encountered while processing: dovecot-imapd dovecot-lmtpd <span style="color:#ff6666;">dovecot-pop3d E: Sub-process /usr/bin/dpkg returned an error code (1)</span>
Debian/Ubuntu快速安装Node.js最新v8.1.2版本方法
如今我们仅仅用Linux VPS、服务器用来建站或者普通的软件环境,可能还不至于需要用到Node.js软件环境。今天遇到一个网友需要在Debian8环境中运行某个软件需要用到Node.js,但是直接默认apt-get的版本较低,需要用到较新的版本。
在这篇文章中就记录将这个网友当前的Debian8服务器环境配置Node.js最新版本,前一段时间记得在CentOS安装过5.x版本,但不清楚目前最新版本的Node.js到哪里了,那就去官方看看最新版本。
Debian NFS的设置
NFS是我们常用的文件共享协议,在一些系统中,这个协议的设置也相对比较复杂。那么今天我们就来讲解一下Debian NFS的设置内容。希望对大家有所帮助。首先看看Debian下安装NFS服务器的步骤。
安装Debian NFS服务器端:
# aptitude install nfs-common nfs-kernel-server portmap
Debian普通用户添加sudo权限
刚安装好的Debian默认还没有sudo功能。
1、安装sudo
# apt-get install sudo
2、修改 /etc/sudoers 文件属性为可写
# chmod +w /etc/sudoers
从git版本库中移出文件但不删除
今天在使用git时,把项目所有文件都添加到版本库了,但是项目每次都会生成log日志文件,导致每次git status都会产生有新文件modified, 所以打算用.gitignore配置过滤规则。