Some tips

1-What to do when I don't know the usage of a linux command

1、

type command

2、

help command if the command is built-in  or   

apropos command  or whatis command then

man n command

3、

which command

Also,you can get to know the installation directory of that command.

 

2-get file from the ftp server using ftpget command.

in developing board:

ftpget -u benson -p ****** [ip-address]  [local file name]  [remote file name]

in ubuntu pc:

busybox ftpget -u benson -p ****** [ip-address]  [local file name]  [remote file name]

 

3-What does rc stand for

 The rc command derives from the runcom facility from the MIT CTSS system, ca. 1965. From Brian Kernighan and Dennis Ritchie, as told to Vicki Brown:"There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in Unix is a fossil from that usage."

 

 4-Linux startup

man boot

For each managed service (mail, nfs server, cron, etc.) there is a single startup script located in a specific directory (/etc/init.d in most versions of Linux).  Each of these scripts accepts as a single argument the word "start" -- causing it to start the service, or the word "stop"-- causing it to stop the service.  The script  may  optionally  accept  other "convenience" parameters (e.g:"restart", to stop and then start,"status" do display the service status).  Running  the  script  without parameters displays the possible arguments.

To  make specific scripts start/stop at specific run-levels and in specific order, there are sequencing directories. These  are  normally  in /etc/rc[0-6S].d. In each of these directories there are links (usually symbolic) to the scripts in the /etc/init.d directory.A primary script (usually /etc/rc) is called from inittab(5) and  calls the  services scripts via the links in the sequencing directories.  All links with names that begin with 'S' are being called with the argument "start" . All links with names that begin with 'K' are being called with the argument "stop" .To define the starting or stopping order within the same run-level, the names of the links contain order-numbers.Also,  to  make  the  names clearer,  they  usually end with the name of the service they refer to.Example: the link  /etc/rc2.d/S80sendmail starts the sendmail service on runlevel  2.  This happens   after  /etc/rc2.d/S12syslog is run but before /etc/rc2.d/S90xfs is run.To manage the boot order and run-levels, we have to manage these links.However,on many versions of Linux, there are tools to help with this task (e.g: chkconfig(8)).

The  /etc/inittab  file was the configuration file used by the original System V init(8) daemon.The Upstart init(8) daemon does not use this file,  and  instead  reads  its  configuration  from  files  in  /etc/init.

Usually the daemons started may optionally receive command-line options and parameters.  To allow system administrators to change these parameters without editing the boot scripts themselves,  configuration  files are used.  These are located in a specific directory (/etc/sysconfig on Red Hat systems) and are used by the boot scripts. In older UNIX systems, these files contained the  actual  command  line options  for  the daemons, but in modern Linux systems (and also in HP-UX), these files just contain shell variables.   The  boot  scripts  in /etc/init.d  source  the configuration files, and then use the variable values.

 

5-Get linux kernel source.  

wget http://kernel.osuosl.org/pub/linux/kernel/v2.6/linux-2.6.31.1.tar.bz2

install kernel source code of the current version in /usr/src 

sudp apt-get install linux-source 

 

6-Compile option : -isystem

It belongs to the option set that controls the C preprocessor, which is run on each C source file before actual compilation.           

Search dir for header files, after all directories specified by -I but before the standard system directories.  Mark it as a system directory, so that it gets the same special treatment as is applied to the standard system directories.If dir begins with "=", then the "=" will be replaced by the sysroot prefix; see --sysroot and -isysroot.

 

 7-Link Order

 

error

 

 fix

 explain

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

posted on 2013-03-22 15:51  siszqsqx  阅读(214)  评论(0编辑  收藏  举报

导航