android 泰语资源,Android 泰语、缅甸语等复杂语言圈圈问题
文件與目錄管理
cd:切換目錄
pwd:顯示當前目錄
mkdir:新建一個新的目錄
rmdir:刪除一個空的目錄
ls:查看目錄與文件
cp:復制
rm:刪除
mv:移動|重命名文件與目錄
切換目錄(CD)
語法:cd ?[相對路徑或絕對路徑]
舉例:
[[email?protected] ~]# cd ~tkf //~ 指定用戶的主文件夾
[[email?protected] tkf]# cd //默認為當前用戶的主文件夾
[[email?protected] ~]# cd .. //發揮上一層
[[email?protected] /]# cd /var/spool/mail //絕對路徑
[[email?protected] mail]# cd ../mqueue/ //相對路徑
[[email?protected] mqueue]# pwd
/var/spool/mqueue
[[email?protected] mqueue]# cd - //前一個工作目錄
/var/spool/mail
顯示當前路徑(PWD)
語法:pwd ?[-P]
選項與參數:
-P:顯示當前路徑,而非使用連接(link)路徑
舉例:
[email?protected] ~]# pwd
/root
[[email?protected] ~]# cd /var/mail/
[[email?protected] mail]# pwd
/var/mail
[[email?protected] mail]# pwd –P // /var/mails是鏈接文件,實際路徑是/var/spool/mail
/var/spool/mail
[[email?protected] mail]#
新建目錄(mkdir)
語法:mkdir ?[-mp] 目錄名稱
選項與參數:
-m:直接配置目錄的權限
-p:幫助你直接將所需要的目錄,遞歸創建起來
舉例:
[[email?protected] ~]# cd /tmp
[[email?protected] tmp]# mkdir test
[[email?protected] tmp]# ls -ald ./test
drwxr-xr-x 2 root root 4096 02-20 10:47 ./test
[[email?protected] tmp]# mkdir test1/test2/test3
mkdir: 無法創建目錄 “test1/test2/test3”: 沒有那個文件或目錄
[[email?protected] tmp]# mkdir -p test1/test2/test3
[[email?protected] tmp]# ls -ald ./test1/
drwxr-xr-x 3 root root 4096 02-20 10:48 ./test1/
[[email?protected] tmp]# mkdir -m 711 test5
[[email?protected] tmp]# ls -ald ./test5
drwx--x--x 2 root root 4096 02-20 10:48 ./test5
[[email?protected] tmp]#
刪除空目錄(rmdir)
語法:rmdir [-p] 目錄名稱
選項與參數:
-p:連同上層“空的”目錄一起刪除
舉例:
[[email?protected] tmp]# rmdir test
[[email?protected] tmp]# rmdir test1
rmdir: test1: 目錄非空
[[email?protected] tmp]# rmdir -p test1/test2/test3/
查看目錄與文件(ls)
語法:
[[email?protected] ~]# ls [-aAdfFhilnrRSt] 目錄名稱
[[email?protected] ~]# ls [--color={never,auto,always}] 目錄名稱
[[email?protected] ~]# ls [--full-time] 目錄名稱
選項與參數:
-a:全部的文件,連同隱藏檔( 開頭為 . 的文件) 一起列出來(常用)
-A:全部的文件,連同隱藏檔,但不包括 . 與 .. 這兩個目錄
-d:僅列出目錄本身,而不是列出目錄內的文件數據(常用)
-f:直接列出結果,而不進行排序 (ls 默認會以檔名排序!)
-F:根據文件、目錄等資訊,給予附加數據結構,例如:
*:代表可運行檔; /:代表目錄; =:代表 socket 文件; |:代表 FIFO 文件;
-h:將文件容量以人類較易讀的方式(例如 GB, KB 等等)列出來;
-i:列出 inode 號碼,inode 的意義下一章將會介紹;
-l:長數據串列出,包含文件的屬性與權限等等數據;(常用)
-n:列出 UID 與 GID 而非使用者與群組的名稱 (UID與GID會在帳號管理提到!)
-r:將排序結果反向輸出,例如:原本檔名由小到大,反向則為由大到小;
-R:連同子目錄內容一起列出來,等于該目錄下的所有文件都會顯示出來;
-S:以文件容量大小排序,而不是用檔名排序;
-t:依時間排序,而不是用檔名。
--color=never? :不要依據文件特性給予顏色顯示;
--color=always :顯示顏色
--color=auto?? :讓系統自行依據配置來判斷是否給予顏色
--full-time??? :以完整時間模式 (包含年、月、日、時、分) 輸出
--time={atime,ctime} :輸出 access 時間或改變權限屬性時間 (ctime)
而非內容變更時間(modification time)
復制(cp)
語法:
cp ?[-adfilprsu] 源文件目標文件
選項與參數:
-a:相當于-pdr
-d:若源文件為鏈接文件的屬性,則復制連接文件屬性而非文件本身
-f: 若目標文件已經存在且無法復制,則刪除后在嘗試一次
-i:若目標文件已經存在時,在覆蓋是會先詢問操作的進行
-l:進行硬鏈接
-p:連同文件的屬性一起復制
-r:遞歸持續復制
-s:復制成符號鏈接文件
-u:若目標文件比源文件舊才更新
舉例1:文件復制
[[email?protected] tmp]# cp /var/log/wtmp wtmpTest
[[email?protected] tmp]# cp -i /var/log/wtmp wtmpTest //參數i
cp:是否覆蓋“wtmpTest”? y
[[email?protected] tmp]# ll /var/log/wtmp wtmpTest
-rw-rw-r-- 1 root utmp 125952 02-20 10:25 /var/log/wtmp
-rw-r--r-- 1 root root 125952 02-20 13:18 wtmpTest //屬性變成了當前用戶
[[email?protected] tmp]# cp -a /var/log/wtmp wtmpTest_a //-a 連同屬性一起復制
[[email?protected] tmp]# ll /var/log/wtmp wtmpTest wtmpTest_a
-rw-rw-r-- 1 root utmp 125952 02-20 10:25 /var/log/wtmp
-rw-r--r-- 1 root root 125952 02-20 13:18 wtmpTest
-rw-rw-r-- 1 root utmp 125952 02-20 10:25 wtmpTest_a
[[email?protected] tmp]# su tkf
[[email?protected] tmp]$ cp -a /var/log/wtmp wtmpTest_t
[[email?protected] tmp]$ ll wtmpTest_t
-rw-rw-r-- 1 tkf tkf 125952 02-20 10:25 wtmpTest_t //當用戶權限不足時,即使-a也無法更改屬性
1.??????源文件所在需要具有的權限RX
2.??????目的文件所在目錄需要WX權限
3.??????在權限不足的情況下即使-a也無法更改文件屬性
舉例2:目錄復制
[[email?protected] tmp]# ll ./copydir/
-rw-r--r-- 1 root root 0 02-20 13:54 afile
-rw-r--r-- 1 root root 0 02-20 13:54 bfile
[[email?protected] tmp]# cp /etc ./copydir/ // etc文件夾還有文件,直接復制失敗
cp: 略過目錄 “/etc”
[[email?protected] tmp]# cp -r /etc ./copydir/ // 遞歸復制
[[email?protected] tmp]# ll ./copydir/
-rw-r--r-- 1 root root 0 02-20 13:54 afile
-rw-r--r-- 1 root root 0 02-20 13:54 bfile
drwxr-xr-x 114 root root 12288 02-20 13:59 etc
舉例3:軟硬連接復制
[[email?protected] tmp]# cp -s passwd passwd_slink
[[email?protected] tmp]# cp -l passwd passwd_hlink
[[email?protected] tmp]# ll passwd passwd_*
-rw-r--r-- 3 root root 2219 02-17 12:22 passwd
-rw-r--r-- 3 root root 2219 02-17 12:22 passwd_hlink
lrwxrwxrwx 1 root root 6 02-20 14:07 passwd_slink -> passwd //連接文件
[[email?protected] tmp]# cp passwd_slink passed_slink1
[[email?protected] tmp]# cp -d passwd_slink passed_slink2
[[email?protected] tmp]# ll pass*
-rw-r--r-- 1 root root 2219 02-20 14:20 passed_slink1 //源文件
lrwxrwxrwx 1 root root 6 02-20 14:21 passed_slink2 -> passwd // 連接文件
-rw-r--r-- 3 root root 2219 02-17 12:22 passwd
刪除(rm)
語法:rm [-fir] 文件或目錄
選項與參數:
-f:強制模式,不會進行詢問
-i:互動模式
-r:遞歸刪除
舉例:
[[email?protected] tmp]# ll copydir/
-rw-r--r-- 1 root root 0 02-20 13:54 afile
-rw-r--r-- 1 root root 0 02-20 13:54 bfile
drwxr-xr-x 114 root root 12288 02-20 13:59 etc
[[email?protected] tmp]# rm -r ./copydir/
rm:是否進入目錄 “./copydir/”? y
rm:是否刪除 一般空文件 “./copydir//afile”? y
…
rm:是否刪除 一般文件 “./copydir//etc/tux.mime.types”? y
可以rm -rf ./copydir/ 來避免提示
移動|重命名文件與目錄(mv)
語法:rm [-fiu] 源文件,目標目錄
選項與參數:
-f:強制模式,不會進行詢問
-i:互動模式
-u:若目標文件已經存在,且源文件比較新才會更新
舉例:
[[email?protected] tmp]# mkdir movedir
[[email?protected] tmp]# cp ~/.bashrc ./bashrc
[[email?protected] tmp]# mv -i bashrc ./movedir/ //文件的移動
[[email?protected] tmp]# ll ./movedir/
-rw-r--r-- 1 root root 176 02-20 14:55 bashrc
[[email?protected] tmp]# mv ./movedir/bashrc ./movedir/b1 //文件的重命名
[[email?protected] tmp]# ll ./movedir/
-rw-r--r-- 1 root root 176 02-20 14:55 b1
原文:http://blog.csdn.net/fanmengke_im/article/details/19556527
總結
以上是生活随笔為你收集整理的android 泰语资源,Android 泰语、缅甸语等复杂语言圈圈问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android byte转16进制字符串
- 下一篇: android arrays.xml 二