Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:handbook:commands [2012/06/02 14:21] – fix broken wget example naitsirhc | en:handbook:commands [2016/10/01 05:30] (current) – Examples are more fit to illustrate renaming than copying of file contents. hgt | ||
|---|---|---|---|
| Line 61: | Line 61: | ||
| ===== Move (rename) files or directories ===== | ===== Move (rename) files or directories ===== | ||
| - | The mv command takes the contents of a file and copies it to a new file, then deletes | + | When source and target file are in the same file system |
| < | < | ||
| Line 72: | Line 72: | ||
| < | < | ||
| + | |||
| + | When renaming is not possible, the mv command takes the contents of a file and copies it to a new file, then deletes the original file. | ||
| ===== Create a new file ===== | ===== Create a new file ===== | ||
| Line 102: | Line 104: | ||
| < | < | ||
| + | |||
| + | <note important> | ||
| Note you can also use the //-i// option to remove files or directories and their contents interactively: | Note you can also use the //-i// option to remove files or directories and their contents interactively: | ||