forked from GitNegi/Python_Menu_Program
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux.py
52 lines (39 loc) · 1.43 KB
/
linux.py
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
41
42
43
44
45
46
47
48
49
50
51
52
import os
os.system("tput setaf 3")
print("\t\t------>LINUX<-------")
os.system("tput setaf 7")
print("\n")
def StartLinux():
while(True):
print(
"""
\t\tPress 0: Exit
\t\tPress 1: Present Working Directory
\t\tPress 2: Show Hidden Folder
\t\tPress 3: list File|Folder
\t\tPress 4: print File Data
\t\tPress 5: copy File|Folder
\t\tPress 6: move File|Folder
\t\tPress 7: make Directory|Folder
\t\tPress 8: Create file
"""
)
x = int(input("Enter Your Choice :-> "))
if x == 0:
break
if x == 1:
os.system("pwd")
if x == 2:
os.system("ls -a {}".format(input("Enter Folder Location :-> ")))
if x == 3:
os.system("ls {}".format(input("Enter File|Folder Location :-> ")))
if x == 4:
os.system("cat {}".format(input("Enter File Name + Location :-> ")))
if x == 5:
os.system("cp {} {}".format(input("Enter File|Folder To Be Copy + Location : "),input(" Destimation Location : ")))
if x == 6:
os.system("mv {} {}".format(input(" File|Folder To be Move With Location : "),input(" Destination Location : ")))
if x == 7:
os.system("mkdir {}".format(input("Enter Location With Directory Name : ")))
if x == 8:
os.system("touch {}".format(input("Enter File name : ")))