Linux system basic commands date time command date is used to view and set the current system Time: format the display time: + % Y -- % m -- % d command hwclock (clock) the hardware clock time command cal is used to view the Calendar uptime to view the system running time output and query... linux system basic commands date time command date is used to view and set the current system Time: format the display time: + % Y -- % m -- % d command hwclock (clock) the command cal is used to display the hardware clock time. the calendar uptime is used to view the system running time output. the command echo is used to display the file content. The Command cat is used to display the file content. The Command head is used to display the file header. rows (10 rows by default) -n: specify the number of lines to be displayed. command tail is used to display the last few lines of the file (10 lines by default)-n: specify the number of lines to be displayed-f: Trace to display file updates (the command will not exit, instead, the new content is continuously displayed.) the more command is used to display the file content on pages (only the content can be flipped down). The le command Ss is used to display the file content on pages (up and down pages) run the hardware information command lspci to view the PCI device-v View details command lsusb to view the USB device-v View details command lsmod to view the loaded module shutdown, the restart command shutdown is used to shut down the [shutdown, restart] time-h to shut down the computer-r restart example: command function: shutdown-h now shutdown immediately shutdown-h + 10 minutes later shutdown-h now restart command poweroff command to immediately shut down the computer command reboot to immediately restart archive and compress command zip OK .zip myfile to decompress zip File unzip OK .zip command gzip to decompress file gzip OK myfile command tar to archive file tar-cvf OK .tar folder tar-xvf OK .tar -cvzf OK. Tar.gz folder (the archive file after the-z parameter is archived for gzip compression) search command locate to quickly find files and folders this command requires a database to be created in advance, the database is updated every day by default, you can use the update command to manually create (ubuntu is updatedb), and update the database command find for advanced search of files and folders. the command format is the find location search parameter. The following is an example of the use of the find command. -name filename: In the current directory (and directory), find the file named filename find/-name *. in the root directory (and sub-directories) of conf, find/-iname myfile. in the root directory (and sub-directories), find the file named myfile, and ignore the case of file name find/-perm 777 in the root directory (and sub-directory) find the file with the permission of 777 find/-type d in the root directory (and sub-directory) find a file (folder) with the file type d. -name "a *"-exec ls-l {}\; in the current directory (and sub-directories), find the file starting with a and use it as a parameter to pass it to the command ls, and execute ls
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