Hi friends, this blog post contains code and some tips related to implementation of some of shell commands in Python or better to say “MAKING YOUR OWN TERMINAL”. Let me start up with the problem statement.
Python program that can simulate linux files and directory commands such as list(ls) ,copy(cp) ,move(mv) ,rename(mv) ,delete(rm),file details(ls -l), etc.
And also a special function ‘dirstr’ that will list directory structure of the present working directory recursively.
(Try running it on your own on your computer after downloading below code 😀 )
- In cases where a folder is empty it should be mentioned explicitly as (“EMPTY FOLDER”).
- Output format should be as close as possible to the linux output (actually if it don’t look identical, it is waste.. :/ )
- Error Handling should be done (for permission denied errors and others) properly.
- Obviouslyuse don’t just make it using ‘os.system’.. -_-
Btw yeah, it also has a HELP too.. 😛 You can use it to know more about the program.. 😉