特殊:Badtitle/NS100:Forum/moving:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/forum/moving}} {{Languages|UbuntuHelp:forum/moving}} The how to has been pulled together in credit by darkmatter from Ubuntu Forums. The How To ha... |
小无编辑摘要 |
||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:forum/moving}} | {{Languages|UbuntuHelp:forum/moving}} | ||
The how to has been pulled together in credit by darkmatter from Ubuntu Forums. The How To has been edited and published by SteveMyers. | The how to has been pulled together in credit by darkmatter from Ubuntu Forums. The How To has been edited and published by SteveMyers. | ||
The direct steps are provided on moving a file from one directory to another by the command line, in doing so the serial.txt is being used as an example of how to move a file from one side of the HD to the other. | The direct steps are provided on moving a file from one directory to another by the command line, in doing so the serial.txt is being used as an example of how to move a file from one side of the HD to the other. | ||
------------------------------------------- | ------------------------------------------- | ||
To move !serial.txt to math (as root - since the output you listed was from your root account), type the following in a terminal. | To move !serial.txt to math (as root - since the output you listed was from your root account), type the following in a terminal. | ||
<pre><nowiki> | <pre><nowiki> | ||
mv ~/!serial.txt ~/math | mv ~/!serial.txt ~/math | ||
</nowiki></pre> | </nowiki></pre> | ||
The '~' is a 'shorthand' representation for the 'home' folder of the account you are running from. For example, If the above files were on my system under my user account, I could move the .txt by the following | The '~' is a 'shorthand' representation for the 'home' folder of the account you are running from. For example, If the above files were on my system under my user account, I could move the .txt by the following | ||
Code: | Code: | ||
<pre><nowiki> | <pre><nowiki> | ||
mv /home/darkmatter/!serial.txt /home/darkmatter/math | mv /home/darkmatter/!serial.txt /home/darkmatter/math | ||
</nowiki></pre> | </nowiki></pre> | ||
Running as root, and the above files were in my root directory, I would move the .txt with | Running as root, and the above files were in my root directory, I would move the .txt with | ||
<pre><nowiki> | <pre><nowiki> | ||
mv /root/!serial.txt /root/math | mv /root/!serial.txt /root/math | ||
</nowiki></pre> | </nowiki></pre> | ||
To save on typing, I can substitute '~' in place of the home directory. So for either of the above situations, the command would look the same: | To save on typing, I can substitute '~' in place of the home directory. So for either of the above situations, the command would look the same: | ||
<pre><nowiki> | <pre><nowiki> | ||
mv ~/!serial.txt ~/math | mv ~/!serial.txt ~/math | ||
</nowiki></pre> | </nowiki></pre> | ||
The same files, if in the root account, could also be moved with the sudo command from my user account, but i would need to give the full path to the file, as well as the math directory | The same files, if in the root account, could also be moved with the sudo command from my user account, but i would need to give the full path to the file, as well as the math directory | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo mv /root/!serial.txt /root/math | sudo mv /root/!serial.txt /root/math | ||
</nowiki></pre> | </nowiki></pre> | ||
Special Reference In a terminal, type | Special Reference In a terminal, type | ||
<pre><nowiki> | <pre><nowiki> | ||
man bash | man bash |
2007年11月30日 (五) 17:20的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/forum/moving }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/af | • {{#if: UbuntuHelp:forum/moving|Afrikaans| [[::Forum/moving/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ar | • {{#if: UbuntuHelp:forum/moving|العربية| [[::Forum/moving/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/az | • {{#if: UbuntuHelp:forum/moving|azərbaycanca| [[::Forum/moving/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/bcc | • {{#if: UbuntuHelp:forum/moving|جهلسری بلوچی| [[::Forum/moving/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/bg | • {{#if: UbuntuHelp:forum/moving|български| [[::Forum/moving/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/br | • {{#if: UbuntuHelp:forum/moving|brezhoneg| [[::Forum/moving/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ca | • {{#if: UbuntuHelp:forum/moving|català| [[::Forum/moving/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/cs | • {{#if: UbuntuHelp:forum/moving|čeština| [[::Forum/moving/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/de | • {{#if: UbuntuHelp:forum/moving|Deutsch| [[::Forum/moving/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/el | • {{#if: UbuntuHelp:forum/moving|Ελληνικά| [[::Forum/moving/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/es | • {{#if: UbuntuHelp:forum/moving|español| [[::Forum/moving/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/fa | • {{#if: UbuntuHelp:forum/moving|فارسی| [[::Forum/moving/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/fi | • {{#if: UbuntuHelp:forum/moving|suomi| [[::Forum/moving/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/fr | • {{#if: UbuntuHelp:forum/moving|français| [[::Forum/moving/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/gu | • {{#if: UbuntuHelp:forum/moving|ગુજરાતી| [[::Forum/moving/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/he | • {{#if: UbuntuHelp:forum/moving|עברית| [[::Forum/moving/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/hu | • {{#if: UbuntuHelp:forum/moving|magyar| [[::Forum/moving/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/id | • {{#if: UbuntuHelp:forum/moving|Bahasa Indonesia| [[::Forum/moving/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/it | • {{#if: UbuntuHelp:forum/moving|italiano| [[::Forum/moving/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ja | • {{#if: UbuntuHelp:forum/moving|日本語| [[::Forum/moving/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ko | • {{#if: UbuntuHelp:forum/moving|한국어| [[::Forum/moving/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ksh | • {{#if: UbuntuHelp:forum/moving|Ripoarisch| [[::Forum/moving/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/mr | • {{#if: UbuntuHelp:forum/moving|मराठी| [[::Forum/moving/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ms | • {{#if: UbuntuHelp:forum/moving|Bahasa Melayu| [[::Forum/moving/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/nl | • {{#if: UbuntuHelp:forum/moving|Nederlands| [[::Forum/moving/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/no | • {{#if: UbuntuHelp:forum/moving|norsk| [[::Forum/moving/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/oc | • {{#if: UbuntuHelp:forum/moving|occitan| [[::Forum/moving/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/pl | • {{#if: UbuntuHelp:forum/moving|polski| [[::Forum/moving/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/pt | • {{#if: UbuntuHelp:forum/moving|português| [[::Forum/moving/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ro | • {{#if: UbuntuHelp:forum/moving|română| [[::Forum/moving/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/ru | • {{#if: UbuntuHelp:forum/moving|русский| [[::Forum/moving/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/si | • {{#if: UbuntuHelp:forum/moving|සිංහල| [[::Forum/moving/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/sq | • {{#if: UbuntuHelp:forum/moving|shqip| [[::Forum/moving/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/sr | • {{#if: UbuntuHelp:forum/moving|српски / srpski| [[::Forum/moving/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/sv | • {{#if: UbuntuHelp:forum/moving|svenska| [[::Forum/moving/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/th | • {{#if: UbuntuHelp:forum/moving|ไทย| [[::Forum/moving/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/tr | • {{#if: UbuntuHelp:forum/moving|Türkçe| [[::Forum/moving/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/vi | • {{#if: UbuntuHelp:forum/moving|Tiếng Việt| [[::Forum/moving/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/yue | • {{#if: UbuntuHelp:forum/moving|粵語| [[::Forum/moving/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/zh | • {{#if: UbuntuHelp:forum/moving|中文| [[::Forum/moving/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/zh-hans | • {{#if: UbuntuHelp:forum/moving|中文(简体)| [[::Forum/moving/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:forum/moving | UbuntuHelp:forum/moving | {{#if: | :}}Forum/moving}}/zh-hant | • {{#if: UbuntuHelp:forum/moving|中文(繁體)| [[::Forum/moving/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:forum/moving|:Forum/moving|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Forum/moving/zh | | {{#ifexist: Forum/moving/zh | | {{#ifeq: {{#titleparts:Forum/moving|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Forum/moving|1|-1|}} | zh | | }}
The how to has been pulled together in credit by darkmatter from Ubuntu Forums. The How To has been edited and published by SteveMyers. The direct steps are provided on moving a file from one directory to another by the command line, in doing so the serial.txt is being used as an example of how to move a file from one side of the HD to the other.
To move !serial.txt to math (as root - since the output you listed was from your root account), type the following in a terminal.
mv ~/!serial.txt ~/math
The '~' is a 'shorthand' representation for the 'home' folder of the account you are running from. For example, If the above files were on my system under my user account, I could move the .txt by the following Code:
mv /home/darkmatter/!serial.txt /home/darkmatter/math
Running as root, and the above files were in my root directory, I would move the .txt with
mv /root/!serial.txt /root/math
To save on typing, I can substitute '~' in place of the home directory. So for either of the above situations, the command would look the same:
mv ~/!serial.txt ~/math
The same files, if in the root account, could also be moved with the sudo command from my user account, but i would need to give the full path to the file, as well as the math directory
sudo mv /root/!serial.txt /root/math
Special Reference In a terminal, type
man bash