Which command is used to format the partition in the linux system – linux operation and maintenance

Which command does the Linux system use to format partitions? Linux system format partition with fdisk command. Linux fdisk is a program to create and maintain a partition table, which is compatible with DOS type partition table, BSD or SUN type disk list. Syntax fdisk [required parameter][option parameter] required Parameters: -l lists all partition tables -u is used with “-l” to display the number of partitions selection parameters: -s specified partition -v version information menu operation instructions m: display menu and help information a: active partition mark/boot partition d: delete partition l: display partition type n: create new partition p: display partition information q: exit without saving t: set partition number v: perform partition check w: Save modification x: Extend application, advanced function Instance Display the current partition status: # fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 1305 10377990 8e Linux LVM Disk /dev/sdb: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't…

How to write scripts in linux-linux operation and maintenance

Shell is not only a command interpretation tool, but also a script programming language. A shell script program can be formed by using various shell commands and some specific grammatical structures. A shell script program is a plain text file. Below we Just look at how to write scripts in Linux. Introduction to programming tutorial, learning address: #course.html The above is in linux For more details on how to write scripts, please pay attention to other related articles on 1024programmer.com!

How does Linux use if to determine whether a directory exists-linux operation and maintenance

1. Use if in the script to determine whether the directory exists #!/bin/bash if [ -d “c” ];then echo “directory c exists” else echo “Directory does not exist” fi Recommendation: Linux Tutorial Column 2. Simple writing method #!/bin/bash [ -d “c” ] && echo “directory c exists” # or [ -d “d” ] || echo “Directory d does not exist” More judgment formats are as follows: -e filename True if filename exists -d filename true if filename is a directory -f filename true if filename is a regular file -L filename true if filename is a symbolic link -r filename True if filename is readable -w filename true if filename is writable -x filename true if filename is executable -s filename True if file length is not 0 -h filename true if the file is a soft link

Big data environment installation test Hadoop

What linux distribution is used for development – linux operation and maintenance

centos linux php Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading jar Install and test Hadoop in a big data environment Big data environment installation test Hadoop… [detailed] Crayon Shinchan 2023-08-25 15:24:41 io Linux basics explain sed command in detail Overview sed is a stream editor (StreamEDitor). It is mainly used to automatically edit one or more files; simplify repeated operations on files; write conversion programs, etc. This article mainly describes: sed working principle sed command format and common options should … [detailed] Crayon Shinchan 2023-08-25 16:53:45

How to decompress .tar files in linux-linux operation and maintenance

How to decompress .tar files in Linux 1. Pack and compress tar -cvf etc.tar /app/etc #package tar -zcvf pack.tar.gz pack/ #Pack and compress into a compressed package in .gz format tar -jcvf pack.tar.bz2 pack/ #Pack and compress into a compressed package in .bz2 format tar -Jcvf pack.tar.xz pack/ #Pack and compress into a compressed package in .xz format 2. Unpack and decompress tar -xvf pack.tar # unpack pack.tar file tar -zxvf pack.tar.gz /pack #Unpack and decompress the compressed package in .gz format to the pack folder tar -jxvf pack.tar.bz2 /pack #Unpack and decompress the compressed package in .bz2 format to the pack folder tar -Jxvf pack.tar.xz /pack #Unpack and decompress the compressed package in .xz format to the pack folder Key explanation: the tar tool itself does not have the function of compression, and it can only be realized by combining the compression tool Better compression. -j: bzip2 -z: gzip -J: xz -c: Packaging -x: Unpacking Recommended study: Linux video tutorial The above is the detailed content of how to decompress .tar files in Linux, please pay attention to more 1024programmer.com Other related articles!

What should I do if the Linux prompt cannot find the FTP command-linux operation and maintenance

What should I do if the Linux prompt cannot find the FTP command-linux operation and maintenance

linux php Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading io php cli memory overflow, understanding of PHP memory overflow, command line and web service execution methods This article mainly introduces the understanding of the two execution methods of PHP memory overflow, command line and Web service. It has certain reference value. Now I will share it with you. [detailed] Crayon Shinchan 2023-08-25 16:54:05 io Linux basics explain sed command in detail Overview sed is a stream editor (StreamEDitor). It is mainly used to automatically edit one or more files; simplify repeated operations on files; write conversion programs, etc. This article mainly describes: sed working principle sed command format and common options should … [detailed] Crayon Shinchan 2023-08-25 16:53:45

What to do if you forget the MySQL password in Linux-linux operation and maintenance

1. First edit the /etc/my.cnf file vim /etc/my.cnf Add a line to the file to configure skip-grant-tables For example, add it to this location # read_rnd_buffer_size = 2M datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-grant-tables Then save and exit 2. Restart the mysql service service mysqld restart In this way, you can skip the verification and directly enter mysql 3. Enter mysql mysql 4. Execute sql statements in sequence >use mysql; change database >UPDATE user SET PASSORD =password('The new password you want to set') WHERE USER='root'; reset password >flush privileges; Refresh the MySQL system privilege related tables to prevent denial of access after changes; or restart the MySQL server >quit; Note: If you reset the password and report an error (ERROR 1054 (42S22): Unknown column 'PASSORD' in 'field list&#39 😉 Use >update mysql.user set authentication_string=password('The new password you want to set ') where user='root' ; 5. Edit the /etc/my.cnf file again vim /etc/my.cnf Remove the skip-grant-tables configuration, save and exit 6. Restart the mysql service service mysqld restart At this point, you can log in with the new password! mysql -uroot -p This article comes from the PHP Chinese website, Linux system tutorial column, please continue to pay attention to this column for more…

How to start oracle in Linux-linux operation and maintenance

How to start oracle in Linux-linux operation and maintenance

php linux Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading function php cli memory overflow, understanding of PHP memory overflow, command line and web service execution methods This article mainly introduces the understanding of the two execution methods of PHP memory overflow, command line and Web service. It has certain reference value. Now I will share it with you. [detailed] Crayon Shinchan 2023-08-25 16:54:05 function Linux basics explain sed command in detail Overview sed is a stream editor (StreamEDitor). It is mainly used to automatically edit one or more files; simplify repeated operations on files; write conversion programs, etc. This article mainly describes: sed working principle sed command format and common options should … [detailed] Crayon Shinchan 2023-08-25 16:53:45

What does linux mean-linux operation and maintenance

What does linux mean? Linux is a set of The free-to-use and freely disseminated operating system kernel is a multi-user, multi-task, multi-thread and multi-CPU operating system kernel based on POSIX and Unix. It can run major Unix utilities, applications and network protocols. It supports 32-bit and 64-bit hardware. Linux inherits Unix’s network-centric design idea and is a multi-user network operating system kernel with stable performance. Introduction Linux is a free-to-use and freely disseminated Unix-like operating system kernel. It is a multi-user, multi-task, multi-thread and multi-CPU based on POSIX and Unix operating system kernel. With the development of the Internet, Linux has received support from software enthusiasts, organizations, and companies all over the world. In addition to maintaining a strong development momentum in servers, it has made great progress in personal computers and embedded systems. Users can not only intuitively obtain the implementation mechanism of the operating system, but also modify and improve Linux according to their own needs, so that it can best meet the needs of users. Linux is not only stable in system performance, but also open source software. Its core firewall components are highly efficient and easy to configure, which ensures the security of the system. In…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索