You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modify.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,32 +178,27 @@ This command is used to copy files or directories.
178
178
cd exercises
179
179
cd mytestdir
180
180
```
181
-
182
181
2. Copy the file ``myfile.txt`` to the subdirectory ``testdir1``:
183
182
184
183
```bash
185
184
cp myfile.txt testdir1
186
185
```
187
-
188
186
3. Create a new directory called ``testdir3`` inside ``testdir1``
189
187
190
188
```bash
191
189
cd testdir1
192
190
mkdir testdir3
193
191
```
194
-
195
192
4. Copy the new subdirectory ``testdir3`` to the directory ``testdir2``. Remember, "testdir2" is located outside "testdir1" and at the same "level". This can be done in more than one way. Remember you need the option ``-r`` (for recursive) when copying directories:
196
193
a) "Go up one" and then copy:
197
194
```bash
198
195
cd ..
199
196
cp -r testdir1/testdir3 testdir2/
200
197
```
201
-
202
198
b) Copy will standing inside ``testdir1``
203
199
```bash
204
200
cp -r testdir3 ../testdir2
205
201
```
206
-
207
202
5. If you give the full path while copying, this can be done from anywhere.
0 commit comments