linux命令执行慢,linux 执行命令很慢

Linux执行命令慢有啥原因

开机时间过长 或者用的服务器版 偶尔会卡一下 一般linux是比较效率的

目前创新互联已为千余家的企业提供了网站建设、域名、虚拟主机网站托管、企业网站设计、瀍河网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

linux下 命令行执行matlab速度很慢

首先介绍一下我自己使用的有效方法,一般matlab启动初始化很慢主要的原因是在找注册文件,一般是由于安装了MAC类的软件引起的,所以我按照下文提供的方法“在【目标】中,键入如下内容”$MATLAB\bin\win32\MATLAB.exe” -c “Full Path to the MATLAB license file including file name””,我在快捷方式里面目标路径中键入:"C:\Program Files\MATLAB\R2009b\bin\win32\MATLAB.exe" -c "C:\Program Files\MATLAB\R2009b\bin\win32\lic_standalone.dat",即解决了这个问题,感谢网友无私的分享精神。注意上面路径中lic_standalone.dat是自己的许可文件,换换就可以了!

Matlab随着版本的升级体积越来越大,带来的问题就是启动速度也越来越慢,下面就我注意到的几个影响MATLAB启动速度的问题集中和大家分析下解决办法。

一、preferences方面原因

问题产生原因:

大家都知道,preferences参数很多,如果首选参数设置的不得当,或者文件太大,Matlab启动的时候加载preferences设置就需要较长时间

问题解决方法:

以管理员权限登录,以保证自己有查看隐藏文件的权限。

windows

(1)退出Matlab,一定要确保Matlab不再运行

(2)进入c:\Documents and Settings\ your username\Application Data\MathWorks\MATLAB\ 复制代码真实该路径可以在Matlab中键入prefdir得到

(3)将上述路径中,以Matlab版本号为文件名(比如R2009a)的文件夹,重命名为R2009a_old(其实这一步是在备份preferences文件)

(4)重启Matlab,此时predir下会重新创建一个R2009a文件夹,里面包含了所有的preferences设置,只是属性值都是默认的,当然以前对Matlab的设置全部没有了

(5)如果觉得不满意,那么将新生成的R2009a删除,将R2009a_old重新改为R2009a就可以恢复以前的设置了。

Linux, Unix, or Mac

1) Quit MATLAB. Ensure that MATLAB is no longer running.

2) Rename the “.matlab/” directory in the users home directory, to “.matlab_old/”.

3) Restart MATLAB.

二、License方面原因

问题产生原因:

每次Matlab启动的时候会自动搜索Matlab的License文件,而计算机系统变量LM_LICENSE_FILE,则是用来告诉所有的应用程序从哪里找到对应的License文件

另外系统变量LM_LICENSE_FILE也可能导致初始化很慢,但是该变量只对Matlab负责,LM_LICENSE_FILE是对所有的程序负责

但是假如你的Matlab使用的是网络版的License,你计算机没有联网就会导致无法找到network license

解决方法:

方法一

windows

(1)右击【我的电脑】选择【属性】

(2)在【高级】选项卡中,点击【环境变量】

(3)在下面的【系统变量】找到【LM_LICENSE_FILE】,如果没有,点击【新建】创建一个变量名为LM_LICENSE_FILE的变量

(4)将LM_LICENSE_FILE的属性值设置为Maltab的License文件的绝对路径

(5)重启Matlab

Unix,Linux,or Mac

Check to see if there is an environment variable set. Where this is located depends on the shell you are using. Look in your home folder. This file may be called: .cshrc (c-shell), .profile (bash), or .bashrc (bash)

You can also create an environment variable for that shell session from the command line using export or setenv (depending on your shell), but the above file needs to be edited for a permanent change.

For example:export MLM_LICENSE_FILE /usr/bin/matlab/license.dat

如果你只有一个License,那么你可以当Matlab启动的时候,在Maltab快捷方式或者命令行中指定License路径

windows

(1)右击Matlab快捷方式,选择【属性】

(2)在【目标】中,键入如下内容”$MATLAB\bin\win32\MATLAB.exe” -c “Full Path to the MATLAB license file including file name”

复制代码其中$MATLAB是Matlab安装根目录,可以在Matlab中键入matlabroot得到,Path to the MATLAB license file是License文件的绝对路径

(3)重启Matlab

Unix,Linux,or Mac

Use a -c switch to point directly at the license file when launching.

If the MATLAB installer has created symbolic links, runmatlab -c Full Path to the MATLAB license file including file name

If symbolic links were not created, run from $MATLAB/bin/./matlab -c Full Path to the MATLAB license file including file name

Where $MATLAB is the root MATLAB directory and Path to the MATLAB license file is the absolute path to your license file, likely in your $MATLAB/licenses directory.

ubuntu - sudo 命令执行速度很慢的解决办法

1 切换到root用户

[linux@localhost ~]$ su root

密码:

[root@localhost ~]#

2 查看/etc/sudoers文件权限,如果只读权限,修改为可写权限

[root@localhost ~]# ll /etc/sudoers

-r--r-----. 1 root root 4030 12月 10 09:55 /etc/sudoers

[root@localhost ~]# chmod 777 /etc/sudoers

[root@localhost ~]# ls -l /etc/sudoers

-rwxrwxrwx. 1 root root 4030 12月 10 09:57 /etc/sudoers

3 修改/etc/sudoers文件,执行命令如下:

/ username是你的用户名 /

[root@localhost ~]# echo 'username ALL=(ALL) ALL' /etc/sudoers

可以在root权限下找到 root ALL=(ALL) ALL的字段,在下一行追加:

username ALL=(ALL) ALL

( 我这里的username 是hk )

5分钟之后密码过期,下次需要重新输入,如果不想如此麻烦,可以用以下方法

username ALL=(ALL) NOPASSWD: ALL

说明:格式为{用户名 网络中的主机=(执行命令的目标用户) 执行的命令范围}

4 保存退出,并恢复/etc/sudoers的访问权限为440

[root@localhost ~]# chmod 440 /etc/sudoers

[root@localhost ~]# ll /etc/sudoers

-r--r-----. 1 root root 4030 12月 10 09:59 /etc/sudoers

OK,这样就完成了,经测试绝对可以。

分享名称:linux命令执行慢,linux 执行命令很慢
网站地址:https://www.cdcxhl.com/article42/hcicec.html

成都网站建设公司_创新互联,为您提供自适应网站网页设计公司网站内链电子商务全网营销推广外贸网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

网站优化排名