Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Javaͨ¹ýSamba·þÎñ²Ù×÷Linux¹²ÏíÎļþ


Ê×ÏÈÔÚLinuxÉÏ´´½¨Ò»¸ö¹²ÏíÎļþ¼Ð
mkdir /home/user/share
ÓÃrootÓû§Æô¶¯samba·þÎñ
service smb start
ÐÞ¸Äsmb.confÎļþ
sudo gedit /etc/samba/smb.conf »òÕß vi /etc/samba/smb.conf
[share]
path = /home/user/share
...
writable = yes
´´½¨¹²ÏíÓû§²¢ÉèÖÃÃÜÂë
sudo useradd smbusr
sudo smbpasswd -a smbusr
ʹÓÃÃüÁî sudo smbpasswd -x ɾ³ýÓû§
ÖØÆôsamba·þÎñ
service smb restart
²âÊÔ
ÔÚwindowsÖÐÊäÈë\\192.168.0.94£¬²¢ÊäÈëÓû§ÃûÃÜÂësmbusr/***,¿´Äܲ»ÄÜ·ÃÎʵ½¹²ÏíÎļþ¼Ð¡£Èç¹û¿ÉÒԵĻ°¿½±´Ò»·Ý±¾µØtxtÎļþµ½´ËĿ¼£¬²¢ÔÚlinuxÖв鿴´ËÎļþÊÇ·ñ´æÔÚ£¬Èç¹ûÓÃviÄܹ»´ò¿ªÎļþÎļþ²¢Õý³£²é¿´ÆäÄÚÈÝ£¬congruatulations!
ÓÃjcifs²âÊÔÎļþ²Ù×÷
È¥ÏÂ
ÔØÊʵ±°æ±¾µÄjcifs£¬½«jcifs-1.3.14.jar¼ÓÈëµ½ÏîÄ¿¹¤³ÌÖС£Ð´¸ö²âÊÔÀ๲ÏíÎļþ²Ù×÷£º
public static void main(String[] args) {

FileInputStream fis = null;
SmbFileOutputStream sfos = null;
try {
fis = new FileInputStream(new File("c:/source.txt"));
sfos = new SmbFileOutputStream(new SmbFile("smb://smbusr:smbusr@192.168.1.94/smbusr/dest.txt"));

byte [] buffer = new byte[1024];
int c = 0;
while ((c = fis.read(buffer)) != -1) {
sfos.write(buffer);
}
} catch (SmbException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

finally {
try {
fis.close();
sfos.close();

} catch (IOException e) {
e.printStackTrace();
}
}
}


Ïà¹ØÎĵµ£º

Linux µÄ¶àÏ̱߳à³ÌµÄ¸ßЧ¿ª·¢¾­Ñé

2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾­Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......

JNAʵÏÖJavaµ÷ÓÃFortran

Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......

´«ÖDz¥¿ÍjavaÅàѵ java»ù´¡Ö®Pool

×òÌìÓиöÅóÓÑÎÊÎÒ£¬Ñ§µÃ»á²»,°³ËµÑ§µÄ»á£¡
ºóÀ´ËûÓÖÎÊÎÒ£¬ËûÈç¹ûѧµÄ»°£¬Ñ§µÄ»áѧ²»»á£¬°³ËµÖ»Òª²»±¿µ°£¬°ÑÐÄ˼·ÅÔÚjavaÉÏ£¬¾ÍÒ»¶¨Ñ§µÄ»á£¡
ʱ¼äÒ»Ö±¹ýµÄ¶¼ºÜ¿ì£¬Ã¿¸öÈËÄÜ°ÑÎÕµÄÒ²Ö»ÓнñÌ죬ËùÒÔ¼´Ê¹À§ÄÑÔٶֻ࣬ÓдËʱ´Ë¿Ì×Ô¼ºÔÚ²»Í£µÄŬÁ¦¡£
ÄÄÅÂÏñÎÏÅ£Ò»ÑùµÄÇ°½ø£¬Ò²Ò»¶¨Óгɹ¦µÄÒ»Ì죬¾ÍÅÂ×Ô¼º·ÅÆú£¬ÅÂ×Ô¼ºÃ»ÓÐÐÅÐÄ£ ......

Linux¹¥·ÀÖ®udev©¶´ÑÝʾ

´Ë©¶´Õë¶Ôlinux2.6Äںˣ¬Ö»ÒªÓÐÆÕͨÓû§È¨ÏÞ£¬¼´¿ÉÌáÉýrootȨÏÞ£¬¿ªÊ¼ÊµÑé°É 1¡¢¸´ÖÆÒÔÏ´úÂ룬±£´æΪudev.sh£¬²¢¸³Óè¿ÉÖ´ÐÐȨÏÞ 2¡¢#useradd test //н¨Ò»¸öÆÕͨÓû§ 3¡¢#su - test //Çл»ÖÁtestÓû§ 4¡¢#ps -ef |grep udev //²é¿´udev id root 474 1 0 Apr09 ? 00:00:00 /sbin/udevd -d 5¡¢#sh udev.sh 473 //Ö´Ð ......

LinuxÏÂÈí¼þ°²×°

LinuxÏÂÈí¼þ°ü°²×°·½·¨
1.ÒѾ­±àÒë´ò°üºÃµÄxxx.rpm
  ʹÓÃrpmÃüÁÐèÒª´ò¿ªÖնˣ¬Çл»µ½xxx.rpmËùÔÚĿ¼£¬rpm -ivh xxx.rpm
2.´ò°üºÃµÄÔ´Âë°üxxx.src.rpm
  ÒªÓÃrpm -rebuild xxx.src.rpmÃüÁîÀ´ÖØÐÂÉú³É
  ×¢£º¶ÔÓÚrpmÃüÁîµÄÏê½â¿ÉÒÔʹÓà $rpm -helpÀ´²é¿´
3.°²×°³ÌÐòxxx.bin
  ÏÈ°Ñxxx.bin¸ÄÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ