-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasic System Commands6
40 lines (40 loc) · 1.37 KB
/
Basic System Commands6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
~/SystemCommands$ ls
file1 main.sh NewFolder renamefile1 replit.nix
~/SystemCommands$ touch file2
~/SystemCommands$ touch file3 file4 file5
~/SystemCommands$ mkdir mydir
~/SystemCommands$ cp file2 mydir
~/SystemCommands$ cd mydir
~/SystemCommands/mydir$ ls
file2
~/SystemCommands/mydir$ cd ..
~/SystemCommands$ ls
file1 file2 file3 file4 file5 main.sh mydir NewFolder renamefile1 replit.nix
~/SystemCommands$ cp file1 file2
~/SystemCommands$ ls
file1 file2 file3 file4 file5 main.sh mydir NewFolder renamefile1 replit.nix
~/SystemCommands$ alias cp='cp -i'
~/SystemCommands$ cp file1 file2
cp: overwrite 'file2'? Y
~/SystemCommands$ rm file1
~/SystemCommands$ cd mydir/
~/SystemCommands/mydir$ ls
file2
~/SystemCommands/mydir$ rm file2
~/SystemCommands/mydir$ cd ..
~/SystemCommands$ rm mydir
rm: cannot remove 'mydir': Is a directory
~/SystemCommands$ ls
file2 file3 file4 file5 main.sh mydir NewFolder renamefile1 replit.nix
~/SystemCommands$ rmdir mydir
~/SystemCommands$ ls
file2 file3 file4 file5 main.sh NewFolder renamefile1 replit.nix
~/SystemCommands$ mkdir newdir
~/SystemCommands$ cd newdir
~/SystemCommands/newdir$ touch file1
~/SystemCommands/newdir$ cd ..
~/SystemCommands$ rm newdir
rm: cannot remove 'newdir': Is a directory
~/SystemCommands$ rm -r newdir
~/SystemCommands$ ls
file2 file3 file4 file5 main.sh NewFolder renamefile1 replit.nix