CMD: commands for cmd Windows and Mac OS - ZolotovaNatalia/JavaCourse_2017 GitHub Wiki

Windows command line

  1. cd folder1 -> go into folder with the name folder1;
  2. cd .. -> go out of the current folder;
  3. cd\ -> go to the root of the driver;
  4. cd -> show the path of the folder in which you are now;
  5. dir -> list of files and folders;
  6. mkdir myFolder -> create folder with the name myFolder. It's recommended not to use spaces in names because it can lead to errors when trying to use the folder. Of course, you can try and see how it works :) ;
  7. rmdir myFolder -> remove myFolder;
  8. del /f myFile -> remove file with the name myFile;
  9. D:\ -> change driver to D. Use C:\ to change driver to C.

Mac OS command line

  1. cd folder1 -> go into folder with the name folder1;
  2. cd .. -> go out of the current folder;
  3. cd -> go to the home directory;
  4. pwd -> show the path of the folder in which you are now;
  5. ls -> list of files and folders;
  6. mkdir myFolder -> create folder with the name myFolder. It's recommended not to use spaces in names because it can lead to errors when trying to use the folder. Of course, you can try and see how it works :) ;
  7. rm myFolder -> remove myFolder or any other file;
  8. cp file1 file2 -> Copy a file1 into file2(new file);
  9. touch file1 -> Make a new empty file with the name file1;
  10. mv file1 someFolder -> Move file1 into someFolder;