Linux shell Command and execution script, linuxshell
Http://blog.csdn.net/pipisorry/article/details/44681081
Cut all subfolders in the current folder to the current folder
For dir in $ (ls)
Do
# Echo $ dir
If [-d $ dir-a "$ (ls-A $ dir)"]; then
Mv./$ dir /*.
Fi
Done
Note:
1. There must be spaces between each component in [], including [-d and "]
2. Determine whether the dir file is a directory & determine whether the dir folder is empty
3. The problem is: if you do not know how to recover it, leave a message to solve it!
Run linux shell commands and script files in windows
You can use git bash (download and install git)
You can execute the sh script file in the test.
Note: Command line toolGit BashAlso integrated into Windows Resource Manager, right-click on the folder, you can clickGit Bash HereAndGit GUI HereQuickly start Git and automatically switch to the specified folder.
From: http://blog.csdn.net/pipisorry/article/details/44681081