How to use the mv command to move files to a specified directory under linux-linux operation and maintenance
The method of using the mv command to move files to the specified directory under linux: Execute the [mv source destination] command. The source can be one or more files or directories, and the target can be a single file or directory. Environment: centos6 operating system The mv command (short for move) is used to move files and directories Rename and move from one location to another. (Video tutorial recommendation: linux video tutorial) The syntax of the mv command is as follows: mv [OPTIONS ] source destination The source can be one or more files or directories, and the destination can be a single file or directory. If multiple files or directories are specified as sources, the destination must be a directory. In this case, the source files will be moved to the target directory. If a single file is specified as the source, and the destination target is an existing directory, the file is moved to the specified directory. If you specify a single file as the source and a single file as the target, then you are renaming the file. If the source is a directory and the target is not, the source is renamed to the target,…
How to mount U disk under linux-linux operation and maintenance
How to mount the U disk under linux: 1. Create a mount directory under the mnt directory; 2. Insert the U disk and execute the [mount -t vfat /dev/sdb /mnt/usb] command to mount 3. Enter the mount directory and check whether the mount is successful. Environment: linux operating system First of all, you have to ensure that the format of your U disk is fat format . (Video tutorial recommendation: linux video tutorial) First enter the /mnt/ directory and create a new usb directory cd /mnt/ mkidr usb First fdisk -l, then plug in the U disk, fdisk -l Check if there is a new hard disk added? Then perform the mount mount -t vfat /dev/sdb /mnt/usb here- t vfat refers to the fat format, /dev/sdb refers to the U disk, /mnt/usb is the place to mount cd /mnt/ usb Enter here to see if you can view the contents of the u disk If not, create a new file, then umount /dev/sdb If the file disappears, mount it again If it is displayed, it means that the mount is successful. Recommended tutorial: linux tutorial The above is the detailed content of how to mount the U disk under linux,…
What is the relationship between Ubuntu (Ubuntu) and linux? -Linux operation and maintenance
Ubuntu (Ubuntu) is a desktop application-based Linux operating system and one of the world’s mainstream Linux distributions; its name comes from “ubuntu” in Zulu or Hausa in southern Africa The term, which means “humanity” and “I exist because everyone exists”, is a traditional African value. Ubuntu is a completely open source operating system built on top of the Linux kernel. The Ubuntu community is built around the ideas of the Ubuntu Manifesto: software should be freely available; software tools should be available in all languages without functional differences; people should have the freedom to customize and modify software. Free, and in unlimited ways, as they see fit. The Ubuntu project is fully committed to the principles of free software development; people are encouraged to use, improve and distribute free software. Ubuntu represents a South African nation’s philosophy of loyalty and relationships. The word developed from the Zulu and Bantu languages used by the Xhosa people. The general meaning of the Ubuntu spirit is “humane treatment” (kindness to others). Another translation can be: “The belief shared by the world connects everyone”. Archbishop Desmond Tutu said this: “A person with the spirit of ubuntu is open-minded, helpful, and not jealous of talents,…
Linux simple knowledge point sharing-linux operation and maintenance
Recommendation: “Linux Tutorial” In the Linux system, access the device as a file. When the Linux kernel boots, read the file system to be loaded from the file /etc/fstab In the Linux file system, each file is identified by an i node All disk blocks are composed of four parts, which are: boot block, dedicated block, i-node block, data storage block The use of the process started by the foreground: ctrl+c is prohibited When installing the Linux system to partition the hard disk, there must be two types of partitions: file system and swap partition. The important task of network management is to monitor and control The kernel is divided into four subsystems: file management system, I/O management system, memory management system and process management system. Linux boot process? Host power-on self-test, load BIOS hardware information Read MBR boot file (grub, lilo) Guide linux kernel li> Run the first process init (the process number is always 1) Enter the corresponding run level Run the terminal, enter the user name and password What parts does the Linux system consist of? Linux system kernel, shell, file system, application How to plan a Linux host, What are the steps? Determine what the machine…
What are the steps for yum to install the php environment-linux operation and maintenance
Yum steps to install php environment: 1. Install nginx; 2. Install php; 3. Edit www.conf configuration file; 4. Start php-fpm and nginx; 5. Edit php.ini configuration file, Open the file upload function; 6. Configure the database. The specific steps are as follows: (Video tutorial recommendation: linux video tutorial) The first step: sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7 .ngx.noarch.rpm yum install php php-fpm php-mysql nginx mariadb-server -y yum install php-gd* -y Step 2: vi /etc/php-fpm.d/www.conf Modify The third step: systemctl start php-fpm systemctl start nginx If you need to enable the file upload function, please modify php.ini vi /etc/php.ini upload_max_filesize = 100M Simple configuration database systemctl start mariadb mysql_secure_installation Enter current password for root (enter for none): #Enter directly for the first run Set root password? [Y/n] #Whether to set the root user password, enter y and press Enter or press Enter directly New password: #Set the password of the root user Re-enter new password: # Enter the password you set again Remove anonymous users? [Y/n] # Whether to delete anonymous users, press Enter Disallow root login remotely? [Y/n] #Whether to prohibit root remote login, press Enter, Remove test database and access to it? [Y/n] # Whether to delete the test database, press…
What is the vim command-linux operation and maintenance
The vim command is a rich text editor and an extended version of the vi editor. It can be used to edit various texts, especially for editing programs. Compared with vi, it has many advantages and can be used many times. Undo, you can open multiple windows for editing, syntax highlighting, command line editing, online help, visual selection, etc. at the same time. vim introduction vim is a rich text editor, an extended version of vi editor, It can be used to edit various texts, especially programs. Compared with vi, it has many advantages, can be undone multiple times, can open multiple windows for editing at the same time, syntax highlighting, command Line editing, online help, visual selection, etc. vim basic operations Open files vim filename #example : Open a.txt file with vim editor vim a.txt If the filename is empty, an empty file will be opened vim [options] [filelist] The left and right square brackets represent a collection, which means that there can be multiple option and multiple lists Five modes of vim Normal Mode: This is the most basic mode. In any of the following modes, you can return to normal mode by clicking Esc Insert mode: In…
What is the locate command – linux operation and maintenance
The locate command is used to find files or directories. The locate command is much faster than [find -name] because it does not search for a specific directory, but a database. The syntax is [locate [OPTION] … [PATTERN]…]. locate command: 1. Command introduction The locate(locate) command is used to find a file or directory. The locate command is much faster than find -name because it does not search a specific directory, but a database /var/lib/mlocate/mlocate.db. This database contains all local file information. The Linux system automatically creates this database and automatically updates it once a day. Therefore, when we use whereis and locate to find files, we sometimes find deleted data, or just created files, but cannot find them. The reason is because the database file does not have Updated. To avoid this situation, you can use the updatedb command to manually update the database before using locate. The whole locate work is actually composed of four parts: /usr/bin/updatedb is mainly used to update the database, through crontab Automatically completed /usr/bin/locate query file location /etc/updatedb.conf updatedb configuration file /var/lib/mlocate/mlocate.db file for storing file information 2. Usage locate [OPTION]… [PATTERN]… 3. Options strong> -b, –basename match only the base name of…
How to use the linuxcd command? -Linux operation and maintenance
linux Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading linux Easy to use free antivirus software Now viruses are flying all over the sky, free and easy-to-use anti-virus software, it is difficult to mix on the Internet without installing anti-virus software! Rising is free for one year, but if Rising takes up too much memory, don’t use Rising’s free and easy-to-use anti-virus software … [detailed] Crayon Shinchan 2023-08-25 16:28:05 server Apache server cannot be opened when XAMPP is installed on MAC After installing MAMP, when starting the service, it prompts that Apache fails to start, and port 80 is occupied. Checking the process, I found that there are several httpd. [detailed] Crayon Shinchan 2023-08-25 16:27:54
How to install php-linux operation and maintenance under Linux
How to install php under linux: 1. Download php source code; 2. Unzip the installation package; 3. Configure installation variables; 4. Compile source code; 5. Switch to the root user and execute the [make install] command to install php. Environment: linux system php5.6 The specific steps are as follows: (Recommended tutorial: linux video tutorial) 1. Download php source code Download the php installation source package from php’s official website. 2. Decompress the installation package The downloaded installation package is in the compressed gz format. In Linux, you can use the built-in tool tar to decompress it. Execute the command in the directory where the installation package is located: tar -zxvf php-5.5.11.tar.gz 3. Configure installation variables Open Decompressed directory – execute the command: cd php-5.5.11 Configure the installation environment – execute the command: (Graphical tutorial recommendation: linux tutorial) ./configure –prefix=/usr/local/servers/php “/usr/local/servers/php” is the installation path, you can change it to your favorite installation path. 4. Compile the source code Execute the compilation command in the decompression directory: make 5. Install php Switch to the root user – execute the command: sudo su root Install- Execute command: make install Create soft link: Execute command: ln -s /usr/local/servers/php/bin/php /usr/local/bin/php
How to use the export command under linux? -Linux operation and maintenance
The linux export command can be used to set or display environment variables; when executing a program in the shell, you can use export to add, modify or delete environment variables for subsequent execution of the program, the syntax format is “export [-fnp][variable name]=[variable setting value]”. Function description: Set or display environment variables. (For example, we want to use a command, but the execution file of this command is not in the current directory, so we must specify the directory of the execution file every time we use it. Trouble, first execute export in the code, which is equivalent to telling the program to execute a certain When you need something, the files you need or what stuff is in these directories) Syntax:export [-fnp][variable name]=[variable setting value] Supplementary note: When executing a program in the shell, the shell will provide a set of environment variables. export can add, modify or delete environment variables for use by subsequent programs. The effect of export is limited to the login operation. Parameters: -f means [variable name] is the function name. -n Delete the specified variable. The variable is not actually deleted, it is just not output to the execution environment of subsequent instructions.…