Linux Application Development notes (i)

Source: Internet
Author: User
Tags file handling wubi

1. Shell current directory $ (PWD)

2. Samba Configuration

sudo apt-get  Install Sambasamba profile is /etc/samba/smb.conf[global]security =Share [linux_share]path=/home/linux/sharepublic =/ETC/INIT.D/SMBD Restart
3, the Linux read disk hard disk capacity size C code implementation
struct Statfs diskinfo;  Statfs ("/", &diskinfo);  unsigned long long totalblocks = diskinfo.f_bsize;  unsigned long long totalsize = Totalblocks * diskinfo.f_blocks;  size_t mbtotalsize = totalsize>>20;  unsigned long long freedisk = diskinfo.f_bfree*totalblocks;  size_t Mbfreedisk = freedisk>>20;  printf ("/  

4, Ubuntu installation fcitx wubi Pinyin Input Method

First step: Unloading load ibussudo apt-get remove IBUs Restart Ubuntu Step two: Install fcitx wubi Pinyin sudo add-apt-repository Ppa:wengxt/fcitx-nightlysudo Apt-get updatesudo apt-get Install im-switch fcitx sudo apt-get install fcitx-table-wbpysudo im-switch-s fcitx im-switch -S Fcitx restart Ubuntu
Simplified Chinese conversion: CTRL+SHIFT+F4, vim use and plug-in installation Ctags installationsudo apt-get install ctags. VIMRC Common ConfigurationSyntax enable
Syntax onColorScheme Deserttaglist InstallationWinmanagerCscopeQuickfixMinibufexplorerVisualmark

Ctags 5.6 Supports auto-completion
Use "Ctrl+t" to return to the original place. Even if the user uses n times "CTRL +" to find n variables, pressing n "Ctrl+t" also returns to the original open file, which is returned as the original path.
Press "Ctrl + P" to complete the auto-completion
Ctags–r
Delete operation (Command mode use)
x Delete a single character at the cursor
DD deletes the cursor in the row
DW deletes all characters from the current character to the end of the word including spaces
#x例如3x删除光标处向右的三个字符
#dd例如3dd从当前行开始向下删除三行文本

Undo Action
U command cancels the last operation and can be used multiple times to restore the original operation
U Cancel all operations
Ctrl+r can revert to operations that use the U command

Copy operation
YY command copies the contents of the current entire line to the VI buffer
YW Copy the contents of the current cursor to the end of the word to the vi buffer, the equivalent of copying a word
y$ copy cursor position to end of line content to buffer area
y^ copy cursor position to the beginning of the content to the buffer area
#yy例如: 5yy is copying 5 rows
#yw例如: 2yw is a copy of two words

If you want to copy the contents of line m to nth row, you can enter M,ny in the last line mode for example: 3,5y copy the third line to the fifth row of contents to the buffer.
The search and replace function of VI is mainly done in the last line mode:

Top-down Search
/To find the character channeling, where/represents the search from the cursor location, for example:/work

To the bottom of the search
? To find the character channeling for example:/work

Replace
: S/old/new replaces the first occurrence of the old in the row with new
: S/old/new/g replaces all occurrences of old in line with new
: #,# s/old/new/g replaces the old from line # to # # with new
:% s/old/new/g replaces the old that appears in the entire article with new



Under the GUI:
(1) Can press I into the insertion mode
(2) Use the mouse to drag the reverse selection to paste the content, press the left mouse button to copy the selected block to the buffer
(3) Then move the cursor to the point where you want to paste, press the middle mouse button (two-button mouse can press the left and right), paste the buffer contents.
Under the plain text terminal:
(1) Select text block, use V to enter visual mode; Move cursor key selection
(2) Copy the selected block to the buffer, use Y; Copy the whole line, with YY
(3) Cut the selected block to the buffer, use D; cut the whole line with DD
(4) Paste the contents of the buffer, using p

Open the second file in the same edit window with: SP [filename]
Switch between multiple edit files, using Ctrl+w

"Ayy copy in multiple files 5, Ubuntu mouse cursor has been flashing problem (there is a dual video card will appear this problem)Enter Settings--display will see an unknown monitor, disable -5. View Dependent libraries:Under cross-compilation:READELF-DL Viewing run-time dependenciesExample: #readelf-dl mplay

x86 case: LDD

Example: #ldd ffplay

Addr2line 0X804888C-E backstrace_debug-f

6, the difference between MIPS and Mipsel
MIPS is the MIPS architecture of Big-endian
Mipsel is the MIPS architecture of Little-endian.
The difference between the two is that the memory of the data stored in the reverse order of bytes, that is, lower the low address or high address.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1. MIPS instruction
The--and instruction is used to deposit an immediate number into a common register
The la--> instruction is used to store an address (or label) in a common register
The move--> instruction is used to store the value of one register in another general register
2. Linux kernel image
There are two types of Linux kernel image files: One is non-compressed version, called image, the other is its compressed version, called Zimage, the head with compression code.
3. Remove SVN
Rm-rf. Git
Rm-rf. Gitignore
4. CPU-related clock signal
The FCLK is the clock signal provided by the CPU.
The HCLK is a clock signal for the AHB bus, advanced High-performance bus, mainly used for high-speed peripherals such as memory controller, interrupt controller, LCD controller, DMA, etc.
The PCLK is a clock signal for the APB bus, advanced peripherals bus, mainly used for low-speed peripherals such as watchdog, UART Controller, IIS, I²c, SDI/MMC, GPIO,RTC and SPI.
5. MMC Boot kernel command
MMC read 0x81010000 0x2000 0x2000; Bootm 0x81010000
0x2000 is the kernel offset address, 0x4000 kernel length, 0x81010000 to copy kernel to memory address
Kernel production mkinimage-s ingenic-a 0x80040000-d Arch/mips/boot/zcompressed/zimage, if the compression kernel should pay attention to the address of the decompression problem.
6. PCM and WAV
Mplayer-quiet-ao alsa:device=hw=0.0 Test.wav
PCM is the original audio data, plus the WAV file header, becomes the WAV file.
PCM is a direct sampling quantization data, is a file format for saving the original digital audio, WAV format is PCM plus a file header.
7, version number modification rules
(1) Major version number: When the function module has a large change, such as adding the module or the overall structure changes. This version number is determined by the project to modify.
(2) Minor version number: Relative to the major version number, the minor version of the upgrade corresponds to only local changes, but the local changes cause the program and the previous version is incompatible, or the program's previous collaborative relationship has been damaged, or there is a significant improvement or enhancement of functionality. This version number is determined by the project to modify.
(3) Revision number: usually bug fixes or some minor changes or expansion of some functions, to publish a revision frequently, fix a serious bug to publish a revision. This version number is determined by the project manager to modify.
8. Remove UltraEdit Open file hint "file may not be DOS format"
Advanced--configuration--File handling--DOS/UNIX/MAC processing--Unix/mac file detection/conversion, select Disable, OK.
9. VI Command
VI does not wrap: set nowrap, opposite command: Set wrap
VI Display line number:

Linux Application Development notes (i)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.