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();
}
}
}
Ïà¹ØÎĵµ£º
Ò»¡¢ÒýÑÔ£º
±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØͼ£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾Ñ飨Õâ¸ö»¹µ ......
ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......
ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë
ÄÚÈÝ£º
Ò»¡¢ÎªÊ²Ã´Òª¼ÓÃÜ£¿
¶þ¡¢¶¨ÖÆÀà×°ÈëÆ÷
Èý¡¢¼ÓÃÜ¡¢½âÃÜ
ËÄ¡¢Ó¦ÓÃʵÀý
Îå¡¢×¢ÒâÊÂÏî
²Î¿¼×ÊÔ´
Java³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË
͵¿´¡£Ö»ÒªÓÐÒ»¸ö·´±àÒëÆ÷£¬ÈκΠ......
¼¸¸ö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»ù´¡ÖªÊ¶
General Public Licence GPL
GNU ÏîÄ¿µÄc¿â£¬gcc£¬Emacs£¬bashµÈÒÆÖ²µ½linuxÄÚºË
linux°æ±¾ÓУºlinux BSD unix   ......