如何获取 Cygwin 中当前工作命令的列表?
How to get list of currently working commands in Cygwin?
目前正在使用 linphone-android 集成。我在安装 Cygwin 期间安装了一些软件包。
当我尝试使用 ls
、rm
、cd
、wget
、tar
等命令时,它们运行良好。但是很少有像 shell
、clean
这样的命令不起作用。它给出错误 command not found.
所以,我的问题是,
Is there any way to get list of working commands for Cygwin?
Is there any way to install packages for these commands rather than installing them manually?
在我看来,最优雅的解决方案是使用 compgen 命令:
compgen -c
列出所有可用命令
compgen -a
列出所有可用的别名
你也可以尝试更暴力的方法:
使用 echo $PATH
从 cygwin 获取所有路径,然后对每个文件夹执行 ls -h <folder_name>
要安装一个包,最好的方法是先安装 apt-get 的等价物:apt-cyg 来自 https://github.com/transcode-open/apt-cyg 并将其放入 /usr/local/bin:
wget raw.github.com/transcode-open/apt-cyg/master/apt-cyg<br>
chmod +x apt-cyg<br>
mv apt-cyg /usr/local/bin<br>
您还可以尝试 运行 用于安装 cygwin 的安装程序可执行文件 setup.exe -q -n -N -d -R c:\cygwin -s http://mirror_site_to_use -l c:\local_package_folder
用于本地软件包或 setup.exe -q -P package_name
让安装程序下载软件包
目前正在使用 linphone-android 集成。我在安装 Cygwin 期间安装了一些软件包。
当我尝试使用 ls
、rm
、cd
、wget
、tar
等命令时,它们运行良好。但是很少有像 shell
、clean
这样的命令不起作用。它给出错误 command not found.
所以,我的问题是,
Is there any way to get list of working commands for Cygwin?
Is there any way to install packages for these commands rather than installing them manually?
在我看来,最优雅的解决方案是使用 compgen 命令:
compgen -c
列出所有可用命令
compgen -a
列出所有可用的别名
你也可以尝试更暴力的方法:
使用 echo $PATH
从 cygwin 获取所有路径,然后对每个文件夹执行 ls -h <folder_name>
要安装一个包,最好的方法是先安装 apt-get 的等价物:apt-cyg 来自 https://github.com/transcode-open/apt-cyg 并将其放入 /usr/local/bin:
wget raw.github.com/transcode-open/apt-cyg/master/apt-cyg<br>
chmod +x apt-cyg<br>
mv apt-cyg /usr/local/bin<br>
您还可以尝试 运行 用于安装 cygwin 的安装程序可执行文件 setup.exe -q -n -N -d -R c:\cygwin -s http://mirror_site_to_use -l c:\local_package_folder
用于本地软件包或 setup.exe -q -P package_name
让安装程序下载软件包