我有一个项目,里面有很多隐藏的文件夹/文件。我想为它创建一个 zip 存档,但存档中不应该有任何隐藏的文件夹/文件。如果隐藏文件夹中的文件不是隐藏的,它们也不应该被包含在内。
我知道我可以创建这样的目录的 zip 存档:
zip -r zipfile.zip directory
Run Code Online (Sandbox Code Playgroud)
我也知道我可以使用 -x 选项排除文件,所以我认为这可能有效:
zip -r zipfile.zip directory -x .*
Run Code Online (Sandbox Code Playgroud)
它没有用。所有隐藏目录仍在 zip 文件中。
对于 TensorFlow,我想安装 cuda 和 CuDNN。我如何在 Ubuntu 16.04 上做到这一点?
对于 TensorFlow,我想安装 CUDA。我如何在 Ubuntu 16.04 上做到这一点?
我想在 Ubuntu 16.04 LTS 上构建和运行 Docker 容器。如何安装 Docker?
您可以diff
使用 meld轻松比较两个文本文件,使用 meld 效果更好:
如果你对图像使用 diff,你会得到一个这样的例子:
$ diff zivi-besch.tif zivildienst.tif
Binary files zivi-besch.tif and zivildienst.tif differ
Run Code Online (Sandbox Code Playgroud)
下面是一个例子:
原文来自http://commons.wikimedia.org/wiki/File:Tux.svg
编辑:
我为两个图像添加了白色背景,并应用了 GIMP 的“差异”过滤器来得到这个:
这是差异如何工作的一种非常简单的方法,但我可以想象出更好(也更复杂)的方法。
你知道一个像 meld 这样对文本有效的程序吗?
(如果存在可以给出百分比的程序(0% 相同的图像 - 100% 相同的图像)我也会对它感兴趣,但我正在寻找一个能给我视觉提示差异的程序。)
如何在 Ubuntu 16.04 上安装 protoc,protobuf 编译器来生成 Java?
我正在尝试安装当前的稳定版本0.12.1
,但它只安装0.9.9
. 有机会安装最新版本apt-get install
吗?这似乎0.9.9
是很老了:(
我正在尝试下载 winamp 的网站,以防他们将其关闭。我需要从字面上下载所有内容。
我试过一次,wget
我设法下载了网站本身,但是当我尝试从中下载任何文件时,它给出了一个没有扩展名或名称的文件。我该如何解决?
我的/etc/resolv.conf看起来像这样:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
# OpenDNS Fallback (configured by Linux Mint in /etc/resolvconf/resolv.conf.d/tail).
nameserver 208.67.222.222
nameserver 208.67.220.220
Run Code Online (Sandbox Code Playgroud)
当我使用nslookup时,我似乎使用了127.0.1.1:
moose@pc08 ~ $ nslookup www.google.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: www.google.com
Address: 173.194.44.17
Name: www.google.com
Address: 173.194.44.16
Name: www.google.com
Address: 173.194.44.19
Name: www.google.com
Address: 173.194.44.18
Name: www.google.com
Address: 173.194.44.20
Run Code Online (Sandbox Code Playgroud)
但是当我右键单击网络管理器并单击“连接信息”时,我得到:
whois 217.0.43.129
表明这属于我的 ISP Deutsche …
我知道我可以检查触摸板是否处于活动状态
gconftool-2 --get /desktop/gnome/peripherals/touchpad/touchpad_enabled
Run Code Online (Sandbox Code Playgroud)
我可以将其设置为禁用/启用
gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled true
Run Code Online (Sandbox Code Playgroud)
随着lsusb
我可以看到所有连接的USB设备。这是我的鼠标:
Bus 003 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
Run Code Online (Sandbox Code Playgroud)
更多信息lsusb -v
:
Bus 005 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x046d Logitech, Inc.
idProduct 0xc00e M-BJ58/M-BJ69 Optical Wheel Mouse
bcdDevice 11.10
iManufacturer 1
iProduct 2
iSerial 0 …
Run Code Online (Sandbox Code Playgroud)