Simple shell emulator on java. Supports commands:
- cat
- cd
- cp
- echo
- exit
- ls
- mkdir
- mkfile
- mv
- rm
- tail
- play with java IO/NIO file API.
- Stability
- Tests
- Usefulness
cat <FILE_NAME> - print FILE_NAME content on console.
cd <DIRECTORY_NAME> - change current directory to DIRECTORY_NAME.
cp <FILE_OR_DIRECTORY_PATH> <DESTINATION_PATH> - copy FILE_OR_DIRECTORY into DESTINATION. DESTINATION must contain name of file/directory to copy (not just exist folder where you want to put your file).
echo <SOME_TEXT> - print text after echo to console.
exit [EXIT_CODE]- exit with EXIT_CODE.
ls [PARAMETERS] [DIRECTORY] - print information about files and folders contained in DIRECTORY. If DIRECTORY not specified then DIRECTORY is current directory.
PARAMETERS:
[-a] - list hidden files,
[-l] - show extended info about files.
mkdir <DIRECTORY_PATH> - create directory on specified path.
mkfile <FILE_PATH> <FILE_CONTENT> - create text file (UTF-8) on specified path witch contain FILE_CONTENT inside.
mv <FILE_OR_DIRECTORY_PATH> <DESTINATION_PATH> - move FILE_OR_DIRECTORY into DESTINATION. DESTINATION must contain name of file/directory to move (not just exist folder where you want to put your file).
rm <FILE_OR_DIRECTORY_PATH> - remove file or directory. If directory not empty remove it recursively.
tail [PARAMETERS] <FILE_PATH> - print last lines of text file (UTF-8 only).
PARAMETERS:
[-n <LINES_NUMBER>] - specify number of lines to print. If not specified - default number is 10,
[-f] - follow changes on file. If file changed, tail will be printed again in real time. To exit this mode enter 'q'.