公告版位

目前日期文章:201609 (7)

瀏覽方式: 標題列表 簡短摘要

# vim /etc/network/interfaces
===================================                             
auto lo
iface lo inet loopback

auto br0 
iface br0 inet static

    address 172.17.11.1
    netmask 255.255.254.0
    gateway 172.17.10.254
    dns-search dreamtails.local
    bridge_ports eth0
    bridge_stp off

    post-up route add default via 172.17.10.254 dev br0 

auto br1 
iface br1 inet dhcp
    bridge_ports eth1
    bridge_stp off 

    post-up route del default dev br1
===================================

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

# vim /etc/dhcp/dhcpd6.conf
===========add==============
......
log-facility local0;
......
===========add==============

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

Command: "C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -multiwindow -dpi 112

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

$ sudo vim /etc/network/interfaces
=============================
# interfaces(5) file used by ifup(8) and ifdown(8)                              
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.17.11.1
netmask 255.255.254.0
gateway 172.17.10.1
dns-search dreamtails.local     # equal to "search" in /etc/resolv.conf

auto eth1
iface eth1 inet dhcp
post-up route del default dev eth1
==============================

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

// write file - overwrite
def filename = "/tmp/text1.txt"
def file = new File(filename)
def w = file.newWriter()

w << "Hello World!"
w.close()

// read file
String r = new File('/tmp/text1.txt').text
println(r)

============= Output =============
Hello World!

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

import java.io.File;

File theFile = new File("/tmp/text1.txt");
println("Dirname: " + theFile.getParent());
println("Basename: " + theFile.getName());

============== Output ==============
Dirname: /tmp
Basename: text1.txt

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()

import java.io.File;

File f = new File("/tmp/text1.txt");
if(f.exists() && !f.isDirectory()) { 
    println("${f.path} - This is a File!")
}

============= Output ===============
/tmp/text1.txt - This is a File!

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()