Operation | *nix | win |
---|---|---|
Print the current directory location | pwd |
echo %cd% |
Remove the file foo (does not work with directories) |
rm foo |
del foo |
Remove directory bar |
rm -r bar |
del bar |
Change disk (e.g., switch to D: ) |
n.a., single root (/ ) |
D: |
Move to the subdirectory baz |
cd baz |
cd baz |
Move to the parent directory | cd .. |
cd.. |
Move (rename) file foo to baz |
mv foo baz |
move foo baz |
Copy file foo to baz |
cp foo baz |
copy foo baz |
Create a directory named bar |
mkdir bar |
md bar |