Practical Use of Linux (1)

Source: Internet
Author: User

1: HOST fun: Host can be used to query domain names, but it can get more information. Host-t mx linux.com can query the MX record of Linux.com and the Host Name of the Mail processing host. Host-l linux.com returns all domain names registered under linux.com. Host-a linux.com displays all domain names of the host.

2: Find the file required by the command. Maybe you want to find out what other related files and commands a command uses? Try ldd. For example, ldd traceroute, the returned result will be libc. so.6, lid-linux.so.2 Z & j, q

3: timed! Timed! Do you want regular processing? You certainly want to make it easier! Crontab can wait for your instructions. Enter crontab-e in the command line and enter 0 5 *** wget-t3-I/home/tom/URLs-N. In this way, the wget command will be run at every morning. The first five parameters are time parameters: the number of hours, days, months, and weeks. You can run the command line here at 5 every Saturday and Sunday. You need man 5 crontab for more detailed explanation. To put it simply, wget is a small program for retrieving web pages. Current time displayed on the top of the console: AT/etc/bashrc or ~ /. Add the environment variable PROMPT_COMMAND to bashrc. Export PROMPT_COMMAND = 'echo-ne "33733 [2; 999r33 [1; 1H33 [00; 44m33 [K" 'date' "33 [00m338 "'

4: You can use up to 23 virtual terminals (VT). Suppose you have 6 files now, and add g in the format of/etc/inittab. | tqq oSl8

8: 234: respawn:/sbin/getty 38400 tty8

24: 234: respawn:/sbin/getty 38400 tty24

Skip VT7 because X uses this terminal. Then telinit q is used to reload the configuration file. Use the left Alt + Fn to switch between 1-6 and 8-12 parts, and the right Alt + Fn key to switch between 13-24 parts.

5: Console switch: Left Alt-direction key, and switch console cyclically. The effect is the same as that of Alt + Fn.

6: simple Dos to Unix: if there is a nasty Ctrl-M at the end of each line in your text file, use this command to quickly solve the problem sed's/^ M // 'filename> newfilename 32

7: quickly create an MP3 player list: find/mnt/cdrom-name *. mp3-print> cd1.play. list. in this way, all MP3 files in CDRom will be created with the name cd1.play. list file. Then you can use xmms or x11amp to play the video.

8:/important information in proc cat/proc/cpuinfo-CPU

Cat/proc/interrupts-interrupt

Cat/proc/ioports-device IO port

Cat/proc/meminfo-memory information (I. e. mem used, free, swap size)

Cat/proc/partitions-all partitions of all devices

Cat/proc/pci-PCI device information

Cat/proc/swaps-information about all Swap partitions

Cat/proc/version-Linux version Y


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.