2013年5月17日 星期五

[Linux] 檔名相關指令

[Linux] 檔名相關指令

取得檔案(相對路徑)的絕對路徑:

readlink -f dir/to/file

ex

float@dorm:~/float-blog$ readlink -f ~/float-blog/linux_file_name_command.rst
/home/float/float-blog/linux_file_name_command.rst

取得檔案所在目錄:

dirnam dir/to/file

ex

float@dorm:~/float-blog$ dirname ~/float-blog/linux_file_name_command.rst
/home/float/float-blog

取得檔案名稱:

basename dir/to/file

ex

float@dorm:~/float-blog$ basename ~/float-blog/linux_file_name_command.rst
linux_file_name_command.rst

1 則留言:

  1. Bush Telegraph is a part of} 로스트아크 the free Slot collection at VideoSlots.com. Your multiplier increases each time one of the evildoers goes down, making a 260x line guess payout potential if all four are defeated. The Terminator Genisys Slot machine options 25 guess traces of action and a powerful ninety five.seventy six per cent RTP. From the importance of the RTP of every sport to the differences between bonuses and phrases and situations.

    回覆刪除