Find Out Directory Size Command -Linux

b] Summarize disk usage of each FILE/Directory/Folder.
[c] Shows the sizes of directories and files
Syntax

The basic syntax is:

du
du dirName
du [options] dirName

Examples

Without any options, du command shows the names and used space for each directories including all sub-directories in the current directory:
du

Sample outputs:

Fig.01: du command in action
Fig.01: du command in action
To find information about /etc and /home/nixcraft directory, enter:
du /path/to/dir
du /etc
du /home/nixcraft
du /root /home/nixcraft

Pass the -h option to get output in human readable format i.e. show output in kilobytes (K), megabytes (M) and gigabytes (G):
du -h /etc
du -h /dir1/file2
du -h /root
du -h

Sample outputs:

8.0K ./.vim
24K ./scripts
48K ./.ssh
16K ./.keychain
2.2M ./.lftp
2.4M .
Pass the -s option to see the total disk space used by a directory:
du -sh
du -sh /etc/
du -sh /etc /home/ /securebackup/

Sample outputs:

4.1M /etc
152K /home/
902M /securebackup/
Pass the -c to see a grand total for all of the files, type:
du -csh /root/ /etc/ /home/

Sample outputs:

2.4M /root/
4.1M /etc/
152K /home/
6.6M total

Advertisements

forget mysql root password in ubuntu

1. linux mysql的配置文件

windows下是my.ini
linux下是my.cnf

find / -name 你要找的文件(my.cnf)
mysql 的配置文件 在/etc/my.cnf 是对的

$ locate my.cnf
/etc/mysql/my.cnf

ls -l /etc/mysql/my.cnf
-rw-r–r– 1 root root 3504 Dec 7 20:01 /etc/mysql/my.cnf

修改MySQL的登录设置:
# vi /etc/my.cnf
在[mysqld]的段中加上一句:skip-grant-tables
例如:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-grant-tables 
保存并且退出vi。

  • :w!  若文件属性为只读,强制写入该文件
  • :wq  保存后退出,若为:wq!,则为强制保存后退出(常用)
  • o,O   插入新的一行:从光标所在处的下一行行首开始输入字符(常用)

重新启动mysqld/mysql

sudo /etc/init.d/mysql stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop mysql
mysql stop/waiting

sudo service mysql restart

Start mysql client

mysql -u root

Flush privileges and reset the password

mysql> USE mysql ; 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> UPDATE user SET Password = password ( ‘new-password’ ) WHERE User = ‘root’ ; 
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

mysql> flush privileges ; 
Query OK, 0 rows affected (0.01 sec)

mysql> quit

将MySQL的登录设置修改回来 

# vi /etc/mysql/my.cnf
将刚才在[mysqld]的段中加上的skip-grant-tables删除 
保存并且退出vi。

重新启动mysqld 

# /etc/init.d/mysqld restart

sudo service mysql restart

mysql stop/waiting
mysql start/running, process 18577

改变文件权限:

chmod go-rw xxx.xxx //表示删除xxx.xxx中组群和其他人的读和写的权限

  • u 代表所有者(user)
  • g 代表所有者所在的组群(group)
  • o 代表其他人,但不是u和g (other)
  • a 代表全部的人,也就是包括u,g和o
  •  +表示添加权限, – 表示删除权限,  = 表示使之成为唯一的权限

ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘db’

via Linux平台:忘记mysql的root密码解决办法

Reset lost/forgot MYSQL root password ubuntu

2. Azure 强密码需要以下 4 项中的 3 项

  • 小写字符
  • 大写字符
  • 数字 (0-9)
  • 符号(请参阅前面提到的密码限制)

默认情况下,用户在更改其密码时需要创建强密码。 管理员能够通过 适用于 Windows Power Shell 的 Windows Azure Active Directory 模块在用户级别启用和禁用此设置。

mex dist_bw_sc_C.c in Ubuntu

>> mex dist_bw_sc_C.c

Warning: You are using gcc version "4.6.3-1ubuntu5)". The version
currently supported with MEX is "4.4.6".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/

dist_bw_sc_C.c:1:27: fatal error: common_matlab.h: No such file or directory
compilation terminated.

mex: compile of ' "dist_bw_sc_C.c"' failed.

Error using mex (line 206)
Unable to complete successfully.

~/.matlab/R2012a$ chmod a+w mexopts.sh

sudo gedit ~/.matlab/R2012a/mexopts.sh
replace all instances of CC='gcc' to CC='gcc-4.3'CXX='g++' to CXX='g++-4.3', and FC='gfortran' to FC='gfortran-4.3'. Save and exit.

  • linux:*.amexa64
  • windows:*.mexw64

host name & domain name

Domain name

Some software expects the system host name to be resolvable to an IP address with a canonical fully qualified domain name.

This is really improper because system host names and domain names are two very different things; but there you have it.In order to support that software, it is necessary to ensure that the system host name can be resolved.

Most often this is done by putting a line in /etc/hosts containing some IP address and the system hostname. If your system has a permanent IP address then use that; otherwise use the address 127.0.1.1.

Name Resolution

Name resolution as it relates to IP networking is the process of mapping IP addresses to hostnames, making it easier to identify resources on a network. How to properly configure system for name resolution using DNS and static hostname records?

DNS Client Configuration

To configure your system to use DNS for name resolution, add the IP addresses of the DNS servers that are appropriate for your network in the file /etc/resolv.conf. You can also add an optional DNS suffix search-lists to match your network domain names.

Below is an example of a typical configuration of /etc/resolv.conf for a server on the domain “example.com” and using two public DNS servers.

search example.com
nameserver 8.8.8.8
nameserver 8.8.4.4

The search option can also be used with multiple domain names so that DNS queries will be appended in the order in which they are entered. For example, your network may have multiple sub-domains to search; a parent domain of example.com, and two sub-domains, sales.example.com and dev.example.com.

If you have multiple domains you wish to search, your configuration might look like the following.

search example.com sales.example.com dev.example.com
nameserver 8.8.8.8
nameserver 8.8.4.4

If you try to ping a host with the name of server1, your system will automatically query DNS for its Fully Qualified Domain Name (FQDN) in the following order:

  1. server1.example.com
  2. server1.sales.example.com
  3. server1.dev.example.com

If no matches are found, the DNS server will provide a result of notfound and the DNS query will fail.

  • Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the “admin” Unix group. In Ubuntu 12.04, administrator access will be granted via the “sudo” group.
  • resolvconf is now used to manage /etc/resolv.conf on all Ubuntu systems.
  • The most notable difference for the user is that any change manually done to /etc/resolv.conf will be lost as it gets overwritten next time something triggers resolvconf.
  • Instead, resolvconf uses DHCP client hooks, a Network Manager plugin and /etc/network/interfaces to generate a list of nameservers and domain to put in /etc/resolv.conf.
  • I use static IP configuration, where should I put my DNS configuration?
    • The DNS configuration for a static interface should go as “dns-nameservers”, “dns-search” and “dns-domain” entries added to the interface in /etc/network/interfaces

Static Hostnames

Static hostnames are locally defined hostname-to-IP mappings located in the file /etc/hosts. Entries in the hosts file will have precedence over DNS by default. This means that if your system tries to resolve a hostname and it matches an entry in /etc/hosts, it will not attempt to look up the record in DNS. In some configurations, especially when Internet access is not required, servers that communicate with a limited number of resources can be conveniently set to use static hostnames instead of DNS.

The following is an example of a hosts file where a number of local servers have been identified by simple hostnames, aliases and their equivalent Fully Qualified Domain Names (FQDN’s).

127.0.0.1	localhost
127.0.1.1	ubuntu-server
10.0.0.11	server1.example.com server1 vpn
10.0.0.12	server2.example.com server2 mail
10.0.0.13	server3.example.com server3 www
10.0.0.14	server4.example.com server4 file
Reference
Ubuntu Network configuration: https://help.ubuntu.com/10.04/serverguide/network-configuration.html

ubuntu查看hostname,mac address

  1. uname –n
  2. /etc/hostname与/etc/hosts
    • /etc/hostname中存放的是主机名,hostname文件的一个例子:
      v-jiwan-ubuntu-temp
    • /etc/hosts存放的是域名与ip的对应关系,域名与主机名没有任何关系,你可以为任何一个IP指定任意一个名字,hostname文件的一个例子:
      127.0.0.1       localhost
      127.0.1.1       v-jiwan-ubuntu

ifconfig -a

HWaddr 00:15:5d:3a:b4:b6

$ cat /etc/issue
Ubuntu 12.04.1 LTS \n \l

/etc$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

lshw
lshw命令显示详细硬件信息。
如果要用概要方式显示,可以加上short参数:lshw-short
要显示指定硬件信息,加上class(或C)参数:lshw -classmemory

sysstat
监测系统性能及效率的一组工具,这些工具对于我们收集系统性能数据,比如CPU使用率、硬盘和网络吞吐数据。

 lspci -v (相比cat/proc/pci更直观)
查看PCI信息,lspci 是读取 hwdata 数据库。

uname -a
查看系统体系结构。

 dmidecode
查看硬件信息,包括bios、cpu、内存等信息

dmesg
显示内核缓冲区系统控制信息,如系统启动时的信息会写到/var/log/。
注:dmesg 工具并不是专门用来查看硬件芯片组标识的工具,但通过这个工具能让我们知道机器中的硬件的一些参数;因为系统在启动的时候,会写一些硬件相关的日志到 /var/log/message* 或/var/log/boot* 文件中。

 lshal 和hal-device-manager

查看 /proc
对于“/proc”中文件可使用文件查看命令浏览其内容,文件中包含系统特定信息:

  • Cpuinfo 主机CPU信息
  • Dma 主机DMA通道信息
  • Filesystems 文件系统信息
  • Interrupts 主机中断信息
  • Ioprots 主机I/O端口号信息
  • Meninfo 主机内存信息
  • Version Linux内存版本信息
    • 查看CPU信息:cat /proc/cpuinfo
    • 查看板卡信息:cat /proc/pci
    • 查看内存信息:cat/proc/meminfo
    • 查看USB设备:cat /proc/bus/usb/devices
    • 查看键盘和鼠标:cat/proc/bus/input/devices
    • 查看各设备的中断请求(IRQ):cat/proc/interrupts

主板信息: sudo demidecode | grep -i ‘serial number’

CPU信息:
cat /proc/cpuinfo
dmesg | grep -i ‘cpu’
sudo dmidecode -t processor

硬盘信息:

  • 查看分区情况: sudo fdisk -l
  • 查看大小情况: df -h
  • 查看使用情况:
    • du -h
    • sudo hdparm -I /dev/sda
    • dmesg | grep sda

内存信息:

  • cat /proc/meminfo
  • dmesg | grep mem
  • free -m
  • vmstat
  • sudo dmidecode | grep -i mem

网卡信息:

dmesg | grep -i ‘eth’
lspci | grep -i ‘eth’

ethtool -i eht0
ethhool -k eth0
ethtool -g eth0

查看鼠标和键盘:

cat /proc/bus/input/devices

查看各设备的中断请求(IRQ):
cat /proc/interrupts

显卡信息:
lspci | grep -i ‘VGA’
dmesg | grep -i ‘VGA’

声卡信息:

  • 查看声卡型号: lspci | grep -i audio
  • 查看型号ac97的声卡驱动模块: modprobe -l | grep ac97
  • 查看声卡信息: cat /proc/asound/cards

查看alsa-utils本: alsactl -v

查看内核alsa版本:
cat /proc/asound/version

声卡信息:
aplay -l

硬件信息之声卡:
sudo lshw -C sound

模块状态之声音:
lsmod | grep -i snd

alsa音频配置:
alsamixer

其他命令:
dmesg
lspci
mpstat(先安装sysstat: sudo spt-get install sysstat)

【error】install matlab 2012a for lunux-64

 ./install -V

Installing …
—————————————————————————
Error: Installation cannot proceed. You may either:
1. Set an X11 display, and restart the install process
2. Use the silent install feature by specifying the -mode silent option
—————————————————————————
Finished

 ./install -mode silent

Preparing installation files …
Installing …
(Dec 17, 2012 12:52:40) ##################################################################
(Dec 17, 2012 12:52:40) #
(Dec 17, 2012 12:52:40) # Today’s Date:
(Dec 17, 2012 12:52:40) Mon Dec 17 12:52:40 UTC 2012
(Dec 17, 2012 12:52:40)
(Dec 17, 2012 12:52:40) System Info
(Dec 17, 2012 12:52:40) OS: Linux 3.2.0-31-virtual
(Dec 17, 2012 12:52:40) Arch: amd64
(Dec 17, 2012 12:52:40) Data Model: 64
(Dec 17, 2012 12:52:40) Language: en
(Dec 17, 2012 12:52:40) Java Vendor: Sun Microsystems Inc.
(Dec 17, 2012 12:52:40) Java Home: /tmp/mathworks_11192/sys/java/jre/glnxa64/jre
(Dec 17, 2012 12:52:40) Java Version: 1.6.0_17
(Dec 17, 2012 12:52:40) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Dec 17, 2012 12:52:40) Java Class Path: .
(Dec 17, 2012 12:52:40) User Name: azureuser
(Dec 17, 2012 12:52:40) Current Directory: /media/matlab-r2012a-linux64
(Dec 17, 2012 12:52:40) Input arguments:
(Dec 17, 2012 12:52:40) root /media/matlab-r2012a-linux64
(Dec 17, 2012 12:52:40) tmpdir /tmp/mathworks_11192
(Dec 17, 2012 12:52:40) mode silent
(Dec 17, 2012 12:52:40) standalone true
(Dec 17, 2012 12:52:41) When running the installer with an input file, you must accept the license agreement by setting the agreeToLicense option to yes.
(Dec 17, 2012 12:52:41) Exiting with status -1
(Dec 17, 2012 12:52:41) End – Unsuccessful
Finished

./install -mode silent -agreeToLicense yes
Preparing installation files …
Installing …
(Dec 17, 2012 12:56:38) ##################################################################
(Dec 17, 2012 12:56:38) #
(Dec 17, 2012 12:56:38) # Today’s Date:
(Dec 17, 2012 12:56:38) Mon Dec 17 12:56:38 UTC 2012
(Dec 17, 2012 12:56:38)
(Dec 17, 2012 12:56:38) System Info
(Dec 17, 2012 12:56:38) OS: Linux 3.2.0-31-virtual
(Dec 17, 2012 12:56:38) Arch: amd64
(Dec 17, 2012 12:56:38) Data Model: 64
(Dec 17, 2012 12:56:38) Language: en
(Dec 17, 2012 12:56:38) Java Vendor: Sun Microsystems Inc.
(Dec 17, 2012 12:56:38) Java Home: /tmp/mathworks_11247/sys/java/jre/glnxa64/jre
(Dec 17, 2012 12:56:38) Java Version: 1.6.0_17
(Dec 17, 2012 12:56:38) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Dec 17, 2012 12:56:38) Java Class Path: .
(Dec 17, 2012 12:56:38) User Name: azureuser
(Dec 17, 2012 12:56:38) Current Directory: /media/matlab-r2012a-linux64
(Dec 17, 2012 12:56:38) Input arguments:
(Dec 17, 2012 12:56:38) root /media/matlab-r2012a-linux64
(Dec 17, 2012 12:56:38) tmpdir /tmp/mathworks_11247
(Dec 17, 2012 12:56:38) mode silent
(Dec 17, 2012 12:56:38) agreeToLicense yes
(Dec 17, 2012 12:56:38) standalone true
(Dec 17, 2012 12:56:39) When running the installer with an input file, you must provide a File Installation Key using the fileInstallationKey option.
(Dec 17, 2012 12:56:39) Exiting with status -1
(Dec 17, 2012 12:56:39) End – Unsuccessful
Finished

/media/matlab-r2012a-linux64$ ./install -mode silent -agreeToLicense yes -fileInstallationKey xxxxx-xxxxx-xxxxx-xxxxx…..
Preparing installation files …
Installing …
(Dec 17, 2012 13:02:19) ##################################################################
(Dec 17, 2012 13:02:19) #
(Dec 17, 2012 13:02:19) # Today’s Date:
(Dec 17, 2012 13:02:19) Mon Dec 17 13:02:19 UTC 2012
(Dec 17, 2012 13:02:19)
(Dec 17, 2012 13:02:19) System Info
(Dec 17, 2012 13:02:19) OS: Linux 3.2.0-31-virtual
(Dec 17, 2012 13:02:19) Arch: amd64
(Dec 17, 2012 13:02:19) Data Model: 64
(Dec 17, 2012 13:02:19) Language: en
(Dec 17, 2012 13:02:19) Java Vendor: Sun Microsystems Inc.
(Dec 17, 2012 13:02:19) Java Home: /tmp/mathworks_11309/sys/java/jre/glnxa64/jre
(Dec 17, 2012 13:02:19) Java Version: 1.6.0_17
(Dec 17, 2012 13:02:19) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Dec 17, 2012 13:02:19) Java Class Path: .
(Dec 17, 2012 13:02:19) User Name: azureuser
(Dec 17, 2012 13:02:19) Current Directory: /media/matlab-r2012a-linux64
(Dec 17, 2012 13:02:19) Input arguments:
(Dec 17, 2012 13:02:19) root /media/matlab-r2012a-linux64
(Dec 17, 2012 13:02:19) tmpdir /tmp/mathworks_11309
(Dec 17, 2012 13:02:19) mode silent
(Dec 17, 2012 13:02:19) agreeToLicense yes
(Dec 17, 2012 13:02:19) fileInstallationKey xxxxx-xxxxx-xxxxx-xxxxx…..
(Dec 17, 2012 13:02:19) standalone true
(Dec 17, 2012 13:02:20) Assembling product list…
(Dec 17, 2012 13:02:38) The destination folder /usr/local/MATLAB/R2012a does not exist. Would you like to create it?
(Dec 17, 2012 13:02:38) Error: Failed to create folder (/usr/local/MATLAB/R2012a).
(Dec 17, 2012 13:02:38) Exiting with status -1
(Dec 17, 2012 13:02:38) End – Unsuccessful
Finished

(Dec 17, 2012 13:08:40) The destination folder /usr/local/MATLAB/R2012a does not exist. Would you like to create it?
(Dec 17, 2012 13:08:40) When running the installer with an input file, you must specify the full path to a license file using the licensePath option.
(Dec 17, 2012 13:08:40) Exiting with status -1
(Dec 17, 2012 13:08:40) End – Unsuccessful
Finished

./install -mode silent -agreeToLicense yes -fileInstallationKey xxxxx-xxxxx-xxxxx-xxxxx….. -licensePath ../license.lic
Preparing installation files …
Installing …
(Dec 17, 2012 13:11:46) ##################################################################
(Dec 17, 2012 13:11:46) #
(Dec 17, 2012 13:11:46) # Today’s Date:
(Dec 17, 2012 13:11:46) Mon Dec 17 13:11:46 UTC 2012
(Dec 17, 2012 13:11:46)
(Dec 17, 2012 13:11:46) System Info
(Dec 17, 2012 13:11:46) OS: Linux 3.2.0-31-virtual
(Dec 17, 2012 13:11:46) Arch: amd64
(Dec 17, 2012 13:11:46) Data Model: 64
(Dec 17, 2012 13:11:46) Language: en
(Dec 17, 2012 13:11:46) Java Vendor: Sun Microsystems Inc.
(Dec 17, 2012 13:11:46) Java Home: /tmp/mathworks_11473/sys/java/jre/glnxa64/jre
(Dec 17, 2012 13:11:46) Java Version: 1.6.0_17
(Dec 17, 2012 13:11:46) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(Dec 17, 2012 13:11:46) Java Class Path: .
(Dec 17, 2012 13:11:46) User Name: azureuser
(Dec 17, 2012 13:11:46) Current Directory: /media/matlab-r2012a-linux64
(Dec 17, 2012 13:11:46) Input arguments:
(Dec 17, 2012 13:11:46) root /media/matlab-r2012a-linux64
(Dec 17, 2012 13:11:46) tmpdir /tmp/mathworks_11473
(Dec 17, 2012 13:11:46) mode silent
(Dec 17, 2012 13:11:46) agreeToLicense yes
(Dec 17, 2012 13:11:46) fileInstallationKey xxxxx-xxxxx-xxxxx-xxxxx…..
(Dec 17, 2012 13:11:46) licensePath ../license.lic
(Dec 17, 2012 13:11:46) standalone true
(Dec 17, 2012 13:11:47) Assembling product list…
(Dec 17, 2012 13:11:54) Installing Product: MATLAB 7.14

(Dec 17, 2012 13:14:33) Installing Product: Simulink 7.9
(Dec 17, 2012 13:17:02) Installing Product: Bioinformatics Toolbox 4.1
(Dec 17, 2012 13:17:47) Installing Product: Control System Toolbox 9.3
(Dec 17, 2012 13:18:03) Installing Product: Curve Fitting Toolbox 3.2.1
(Dec 17, 2012 13:18:05) Installing Product: DSP System Toolbox 8.2
(Dec 17, 2012 13:19:07) Installing Product: Embedded Coder 6.2
(Dec 17, 2012 13:19:10) Installing Product: Fixed-Point Toolbox 3.5
(Dec 17, 2012 13:19:10) Installing Product: Fuzzy Logic Toolbox 2.2.15
(Dec 17, 2012 13:19:11) Installing Product: Global Optimization Toolbox 3.2.1
(Dec 17, 2012 13:19:12) Installing Product: HDL Coder 3.0
(Dec 17, 2012 13:19:17) Installing Product: Image Acquisition Toolbox 4.3

(Dec 17, 2012 13:19:27) Installing Product: Image Processing Toolbox 8.0
(Dec 17, 2012 13:20:32) Installing Product: Instrument Control Toolbox 3.1
(Dec 17, 2012 13:20:33) Installing Product: MATLAB Coder 2.2
(Dec 17, 2012 13:21:23) Installing Product: MATLAB Compiler 4.17
(Dec 17, 2012 13:23:41) Installing Product: Neural Network Toolbox 7.0.3
(Dec 17, 2012 13:23:43) Installing Product: Optimization Toolbox 6.2
(Dec 17, 2012 13:23:46) Installing Product: Parallel Computing Toolbox 6.0
(Dec 17, 2012 13:25:07) Installing Product: Partial Differential Equation Toolbox 1.0.20
(Dec 17, 2012 13:25:12) Installing Product: Signal Processing Toolbox 6.17
(Dec 17, 2012 13:25:34) Installing Product: SimMechanics 4.0
(Dec 17, 2012 13:25:50) Installing Product: SimPowerSystems 5.6
(Dec 17, 2012 13:27:42) Installing Product: Simscape 3.7
(Dec 17, 2012 13:27:46) Installing Product: Simulink Coder 8.2
(Dec 17, 2012 13:27:55) Installing Product: Simulink Control Design 3.5
(Dec 17, 2012 13:27:59) Installing Product: Simulink Fixed Point 7.1
(Dec 17, 2012 13:28:22) Installing Product: Stateflow 7.9
(Dec 17, 2012 13:28:42) Installing Product: Statistics Toolbox 8.0
(Dec 17, 2012 13:28:59) Installing Product: Symbolic Math Toolbox 5.8
(Dec 17, 2012 13:29:33) Installing Product: Wavelet Toolbox 4.9
(Dec 17, 2012 13:29:48) Notes:
1. The following products require a supported compiler:

MATLAB Compiler 4.17
Stateflow 7.9
Simulink Coder 8.2
MATLAB Coder 2.2

2. Simulink requires a C compiler for simulation acceleration, model reference, and MATLAB Function Block capabilities. It is recommended that you install a supported compiler on your machine.

3. To accelerate computations with the following products, a supported compiler is required:

Fixed-Point Toolbox 3.5
(Dec 17, 2012 13:29:48) Exiting with status 0
(Dec 17, 2012 13:29:48) End – Successful.
Finished

matlab -help
matlab: command not found

solution here: Final steps in installing Matlab2012 on Ubuntu 12.04

cd /usr/local/MATLAB/R2012a/bin

./matlab
./matlab: 1: /usr/local/MATLAB/R2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found
/usr/local/MATLAB/R2012a/bin/glnxa64/MATLAB: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory

 /lib/libc.so.6: not found – solution: sudo ln -s /lib/x86_64-linux-gnu/libc-2.13.so /lib64/libc.so.6

% make links between files

locate libc.so.6

sudo means you are running this command as a root account

 ln [options] source dist

产生一个连结(dist)到 source,不会将原本的档案复制一份,只会占用非常少量的磁碟空间。

  • 将档案 yy 产生一个 symbolic link : zz

ln -s yy zz

  • 将档案 yy 产生一个 hard link : zz

ln yy xx

硬连结(hard link)与软连结(symbolic link),硬连结的意思是一个档案可以有多个名称,而软连结的方式则是产生一个特殊的档案,该档案的内容是指向另一个档案的位置。硬连结是存在同一个档案系统中,而软连结却可以跨越不同的档案系统。

sudo rm /lib64/libc.so.6

MATLAB Starting Error in Ubuntu 12.04: libc.so.6: not found

To resolve this problem, open a Terminal window and use the commands below:

1
sudo ln -s /lib/x86_64-linux-gnu/libc-2.15.so /lib64/libc.so.6

If you’re using the Student Version on 64-bit, you should use:

1
sudo ln -s /lib/x86_64-linux-gnu/libc-2.15.so /lib/libc.so.6
  • dpkg -l’ 

to list out the installed packages.

  • ./matlab

/usr/local/MATLAB/R2012a/bin/glnxa64/MATLAB: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory

solution :searched for libXt.so.6 in the Software Center and installed

  • software-center

The program ‘software-center’ is currently not installed. To run ‘software-center’ please ask your administrator to install the package ‘software-center’.

    • If you want to search a package without opening Ubuntu Software Center, you can use apt-cache:

$ apt-cache search firefox

  • sudo apt-get install <packages>
  • sudo apt-get remove application-name
  • ./matlab -glnx86

—————————————————————————
Warning: Cannot locate Java Runtime Environment (JRE) . . .

1. Either a correct JRE was not available for redistribution when
this release was shipped, in which case you should refer to the
Release Notes for additional information about how to get it.

2. Or you have tried to use the MATLAB_JAVA environment variable
to specify an alternate JRE, but MATLAB cannot find it. Please
run ‘matlab -n’ to determine what value you are using for
MATLAB_JAVA and fix accordingly.
—————————————————————————

matlab: No MATLAB bin directory for this machine architecture.

ARCH = glnx86

openjdk-7-jre-headless –  OpenJDK Java runtime, using Hotspot JIT (headless)

apt-get 所下载的用于安装的原始软件包,在 /var/cache/apt/archives

java -version
java version “1.6.0_24”
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

cd /usr/local/bin/
sudo ln -s /usr/local/MATLAB/R2012a/bin/matlab matlab

This trick will allow you to launch matlab from any directory, as you were trying to do. Note that you should use sudo for the last command, since it creates alias globally, for all users.

matlab -version
/usr/local/MATLAB/R2012a/bin/glnxa64/MATLAB: error while loading shared libraries: libXmu.so.6: cannot open shared object file: No such file or directory

a(附加命令)、c(修改命令)、i(插入命令)、o(另起新行)、r(取代命令)以及s(替换命令)都将进入编辑模式

https://help.ubuntu.com/community/MATLAB/R2010a

cygwin下处理windows带空格的文件名

Make sure important programs are in the PATH:

Find the user’s startup “.bashrc” file, located (for example) in
C:\\cygwin\\home\\JohnDoe. Add the following lines to “.bashrc”:

export NDK=/home/JohnDoe/android-ndk-r4-crystax
export SDK="/cygdrive/c/Program Files (x86)/Android/android-sdk"
export ANT_HOME=/cygdrive/c/apache-ant-1.8.3
export OPCV=/home/JohnDoe/opencv
export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.6.0_24"
export PATH=/usr/local/bin:/usr/bin:$NDK:$SDK/tools:
$SDK/platform-tools:$ANT_HOME/bin:$JAVA_HOME/bin

Correct path:

export SDK=/cygdrive/c/Program\ Files\ \(x86\)/Android/android-sdk

空格:转义字符 \加一个空格来表示文件名中的一个空格,有几个空格就写几个 \和空格

括号:转义字符 \加一个括号来表示

生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

槑烎

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web