Course connection: common commands for Linux: date and time command date: Display date and time & amp; 26684
Course connection: common commands in Linux
Date and time command date display date and time format control: + % Y (year) % m (month) % d (day) Modification time: date-s "hour: minute: second "hwclock (clock) display hardware clock time cal view calendar uptime View system running time output, view command echo + "s" Display input content cat + file name display file content more for paging display file content (only flip down) less is used to display the file content on pages (up and down). The head displays the first few lines of the file (10 lines by default).-n specifies the number of lines. tail displays the last few lines of the file (10 lines by default) -n specified number of rows-f trace file update View hardware information ispci view PCI device (sound card, network card) -v View details isusb view USB device-v View details lsmod view loading module (driver) shutdown and restart command shutdown-h shutdown-r restart can specify the shutdown and restart time (now,-10, time) powero Ff immediate shutdown reboot restart archive now compression command zip compressed file name needs to be compressed file example: zip linuxcast.zip myfile upzip unzip file gzip zip compressed file gzip files to be compressed tar archive file (package, not compressed) tar-cvf archive file name archive file (archive file) example: tar-cvf out.tar linuxcast tar-xvf file name (open an archive file) example: tar-xvf linuxcast.tar-cvzf archive file name (archive and compress, compress to call gzip) for example, run the tar-cvzf backup.tar.gz linuxcast Command locate + keyword to quickly search for this command. you need to create a database in advance. the database is updated every day by default. Updatedb manually creates and updates database find location search parameters
-Type based on type-name based on file name-perm based on permission-user based on user-group based on group-ctime based on modification time-size based on file size example: find. -name * linuxcast * find/-name *. conf find/-perm 777 find/-type d find. -name "a *"-exec ls-l {}\ (pass the search result as a parameter to the next command)