Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÄÚºËÅäÖÃÎĵµ(make menuconfig)

Ò»¡¢ÒýÑÔ£º
    ±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾­Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾­Ñ飨Õâ¸ö»¹µ ......

Èý¿î Linux ϵÄÃâ·Ñ×ÀÃ漶ɱ¶¾Èí¼þ(ͼ)


ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......

ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë

ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë    
   
ÄÚÈÝ£º 
 
Ò»¡¢ÎªÊ²Ã´Òª¼ÓÃÜ£¿ 
¶þ¡¢¶¨ÖÆÀà×°ÈëÆ÷  

Èý¡¢¼ÓÃÜ¡¢½âÃÜ 
ËÄ¡¢Ó¦ÓÃʵÀý 
Îå¡¢×¢ÒâÊÂÏî 
²Î¿¼×ÊÔ´ 
Java³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË
͵¿´¡£Ö»ÒªÓÐÒ»¸ö·´±àÒëÆ÷£¬ÈκΠ......

LINUXϲ鿴Ӳ¼þÐÅÏ¢

¼¸¸öcpu
more /proc/cpuinfo |grep "physical id"|uniq|wc -l
ÿ¸öcpuÊǼ¸ºË£¨¼ÙÉècpuÅäÖÃÏàͬ£©
more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l
cpuʹÓÃÂÊ
vmstat  
ÍƼöС¹¤¾ßnmon£¨aixºÍlinux¶¼ÓУ©
topºó°´Êý×Ö1,¶à¸öcpuµÄ»°»áÏÔʾ¶à¸ö
fdisk -l¿ÉÒÔ¿´µ½¶à¸öÎïÀíÓ²ÅÌ£¬×öÁËÓ²raidÖ»ÄÜ¿´µ½Ò»¸öӲŠ......

linux ѧϰ¹ý³Ì£¨1£©

                         linux»ù´¡ÖªÊ¶
General Public Licence  GPL
GNU ÏîÄ¿µÄc¿â£¬gcc£¬Emacs£¬bashµÈÒÆÖ²µ½linuxÄÚºË
linux°æ±¾ÓУºlinux   BSD unix    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ