Linux operating system tips

Source: Internet
Author: User
Article Title: a selection of Linux operating system skills. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

With the continuous improvement of Linux, we can be sure that the application scope of Linux will become wider and wider, and more users will use this software. I hope this article will become a stone of attention, it allows more readers to explore the use of Linux.

View startup

First, check the/Etc/Syslog. conf file and find the corresponding file (for more information, see Man Syslogd, Man Syslog. conf, and Man klogd "). Generally, SlackWare is/Var/Adm/Messages, and Redhat is/Var/Log/Messages. These files may be large and must be backed up and deleted.

Command auto-Fill

1. You only need to enter the first few characters of the file or directory name, and press the Tab key. If none of them are the same, the complete file name will appear in the command line immediately, press the Tab key to list all names starting with these characters in the current directory. for example

Cd/Mnt/Cd is automatically filled with Cd/Mnt/Cdrom

2. In the command line, you only need to enter "m" and press the Tab key twice consecutively. The system will list all commands starting with "m, (including user-defined Bshell command functions), it is particularly useful for searching for unclearly recorded commands. For example, if you enter "Ftp", you will find Ftp, Ftpcount, Ftpwho, ftpshut and other unfamiliar commands.

Use the Nohup command

If you want your process to be executed after exiting the system, you can use the Nohup command, for example:

% Nohup tar-cf/dev/tape/home &

If you log out and then log on again, run the 'ps' command to check that the process is still running.

Note: To put commands in the background for running, Nohup must be used together with & Operations; some software can handle Sighup signals themselves, such as Wget, so no Nohup is required for them.

If you are willing to use your brains, you can also use Nohup to implement PPP callback: first dial up and then execute a self-made script with Nohup, such as "Sleep 60; ppp-start-script and so on. Finally, log out and stop the call.

Run the program in the background

Some programs work very time-consuming. Add an & symbol next to it, such as "Updatedb &" and "Netscape. In this way, the Shell will be released for other work. Note that the parent process of the program is still the Shell. If you exit the Shell, these programs will also be aborted. We recommend that you run the Jobs command to view background Jobs before exiting Shell.

Migrate a Linux Account

The method for migrating a Linux Account is as follows:

1. Ensure that the new account to be added to the system is placed in the new location. This is done by modifying the HOME value in the/Etc/Default/Useradd file.

For example, HOME =/Home2 creates the HOME Directory of the new account under/home2.

2. To move an existing account to a new location, follow these steps:

First, copy the home directory and directory attributes of an existing account to the new location. Run the following command:

Cp-a/Home/Home2 or Cp-rpd/Home/Home2

Then, modify the Home_directory domain of the corresponding record in the/Etc/Passwd file to/Home2/Username.

In these two steps, you can move the old account to a new location. After you make sure that no error exists, you can delete the old home directory of the old account to free up space for the original file system.

Compressed file

Use Compress. For files that do not need to be used frequently, You can compress them to save "tons" of disk space. When you want to use them, you can use the Uncompress option.

The compressed file name ends with. z, which consumes less space, but is also related to the file type. For example, the TIFF image file can only be compressed to 5% of the original text, while the daily database output can be compressed to 25% of the original size.

Compress Filenames is used to Compress one or more files. To decompress a file, use Uncompress Filenames or Compress-d Filenames. The results are the same.

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.