顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

星期三, 7月 27, 2016

[Linux] 常用的一些Server狀態指令


記錄一下Server常用指令集

linux基礎的檔案目錄說明
目錄名稱說明
bin系統的一些重要執行檔Kill、cp、df
boot系統開機的一些載入檔 
cdrom光碟機裡的資料被掛上來的地方 
dosc開機時把dos檔案系統掛上來的地方 
etc系統設定檔 
home使用者的自家目錄所在、ftp server 
lib基本函數庫 
Lost+found系統檢查結果 
mnt可以掛上其它檔案系統 
proc整個系統運作資訊 
root系統管理者的自家目錄所在 
sbin一些設定的可執行程式、設定網路 
tmp雜七雜八的東西 
usr應用程式X-window
var記載著各種系統上的變數的地方 
vmlinuz系統核心檔案 

星期五, 12月 04, 2015

[Bower] ubuntu run bower 發生錯誤

在新裝的ubuntu裝完npm又裝bower後,發現bower無法使用

bigd@ubuntu:~$ bower
/usr/bin/env: node: No such file or directory


可以安裝 nodejs-legacy就可以解決

sudo apt-get install nodejs-legacy

星期三, 6月 04, 2014

[Node.js] Mac 重新安裝npm

今天發現要使用npm install整個噴出異常!!
好像是node的版本太久沒更新了,npm指令整個爛掉。
所以就一直重裝很多次才正常..

系統需求


安裝npm可以透過Mac的套件管理工具homebrew

$ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

安裝完後可以使用doctor來測試brew是否可正常執行

$ brew doctor

Your system is ready to brew.

前情提要 npm


npm is Node's package manager. It is now installed automatically with Node.js so there is no need to do a separate installation.


意思就是npm是一個node.js的套件管理的工具,裝完node.js就會自動安裝好npm了,

不過在Mac下面都是用homebrew這個套件管理工具來安裝node.js

星期六, 7月 20, 2013

[Mac] 砍掉MAC網路磁碟產生的暫存檔"._"


掛載網路硬碟時,不小心把一些噁心的finder產生的暫存檔 ._ 丟到git上XD,
可參考這篇教學:How to remove all Mac "._" files from a Network Drive

可以透過find的指令把相關檔案找出來

$>find <路徑> -name "._*"

然後就會看到相關的暫存檔

要砍掉的話就加個 -delete 參數即可


$>find <路徑> -name "._*" -delete


星期三, 4月 20, 2011

[Linux] 快快樂樂學Linux指令筆記

如何mount裝置內的共享資料夾

1.設定共用資料夾
裝置->共用資料夾->加入共用資料夾

2.在ubuntu建立一個暫存的目錄
$cd /home
$mkdir temp

3.掛載裝置:D_DRIVE為共用資料夾的名稱
#掛載的共享資料夾目錄名稱 ./要掛載的目錄
$sudo mount -t vboxsf D_DRIVE ./temp

4.卸載所有裝置
$umount -a
=====================================================================
Symbol Link

unlink 其實就跟 rm 一樣罷了,當要移除一個 symbolic link ,有時發現怎樣移不掉,一直說 "unkink: my_symbolic_link/ : is a directory" ,這個訊息就跟使用 rm 去移除一個目錄時的錯誤訊息!原來,在移除一個 symbolic link 時,要留意後面不能加個 "/" !這樣,若 symbolic link 是連到一個目錄時,等同於在對那個目錄做 rm 的動作,才會顯示 "is a directory" 訊息。這時可不能一氣之下用 rm -rf !可會將 link 到的目錄給移除掉的!要額外小心。

#目的地是一個檔案
$ ln -s target_file_path my_file_link
$ unlink my_file_link

目的地是一個目錄
$ln -s target_dir my_dir_link
例如:產生在當前目錄下的symbol link
$sudo ln -s /home/temp/mysite.war

$unlink my_dir_link/
$unlink: my_dir_link/: is a directory
$unlink my_dir_link

Done
=====================================================================
MYSQL

#安裝圖形化介面(ubuntu)
$sudo apt-get install mysql-admin

#連接資料庫
$mysql -u root -p

#離開資料庫
mysql>exit


=====================================================================
RM

#移除整個資料夾
$rm -rf 資料夾名

=====================================================================
ifconfig


#列出網路卡資訊
$ifconfig

#設定網路卡ip
$ifconfig eth10 192.168.0.112

=====================================================================
Apache Web Server


#開啟apcahe
$/etc/init.d/httpd start

#關閉apache
$/etc/init.d/httpd stop

#開機啟動檔路徑,可設定開機執行一些shell script指令
$vim /etc/rc.local

=====================================================================
VI

#搜尋
/ <搜尋的字串>

#強制執行存檔
:w ! tee %

#強制離開
:q!


#刪除一行(離開insert模式)
dd

#全刪除
dG



星期五, 10月 29, 2010

[Ant]Ubuntu using Ant Note

1.Installation
$apt-get install ant

2.checked ant version
$ant -version

you should see
Apache Ant version 1.7.1 compiled on July 2 2010


3.ant build
$ant

if you didnt create build .xml , you should see
Buildfile: build.xml does not exist!
Build failed

星期二, 1月 19, 2010

Ubuntu ConnectTo WILE Using Iphon

ation:

Install the bluez-compat package.
Edit /etc/default/bluetooth to add the following lines:
1
PAND_ENABLED=1
2
PAND_OPTIONS="--role=PANU"
Restart the Bluetooth service: /etc/init.d/bluetooth restart
Add the BNEP network adapter to the /etc/network/interfaces file by appending the following line: iface bnep0 inet dhcp
Get the Bluetooth address of your phone by running hcitool scan and jotting down the address next to your phone’s name.
Now the bits and pieces that need to be done each time:

Pair your computer with your iPhone. If you’re using GNOME, the standard Bluetooth applet can handle that; presumably that’s true of the other flavours of Ubuntu as well.
To connect, run these commands in your favourite shell, replacing 00:aa:bb:cc:dd:ee with the Bluetooth address you jotted down earlier:
1
sudo pand --connect 00:aa:bb:cc:dd:ee -n
2
sudo ifup bnep0
At that point, life should be good and you should be connected. To disconnect later:
1
sudo ifdown bnep0
2
sudo pand -K

星期二, 12月 15, 2009

Backup System Using tar


backup:
cd /mnt/linux && tar -jcvf /mnt/bak/linux.tar.bz2 *
restore:
tar -jxvpf /mnt/bak/linux.tar.bz2 -C /mnt/linux

/mnt/linux 備份目錄

星期一, 12月 14, 2009

acer Ferrari 1100 wifi setting

1. 安裝 ndiswrapper
2. 安裝 bcmwl5.inf
3.
sudo modprobe -r b43 b44 ssb wl
sudo modprobe wl
sudo modprobe b44
sudo /etc/init.d/networking restart
sudo iwlist scan

其他你感興趣的文章

Related Posts with Thumbnails