Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the basic command of lunix?

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

What is the basic command of lunix? for this question, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

I. system management

1. View basic information of the system

Arch query processor architecture

Processor Architecture of uname-m display Machine

Uname-r shows the kernel version in use

Cat / proc/cpuinfo displays the information of CPU info

Cat / proc/interrupts display interrupt

Cat / proc/meminfo verifies memory usage

Cat / proc/swaps shows which swap is used

Cat / proc/version shows the kernel version

Df-lh query disk usage

Date displays the system date

Cal 2019 displays the calendar for 2019

II. Document management

Cd / home enter the'/ home' directory'

Cd.. Return to the previous directory

Cd.. /.. Return to the upper two-level directory

Cd enters the personal home directory

Ls view the files in the directory

Ls-F View the files in the directory

Ls-l displays the details of files and directories

Ls * [0-9] * displays file and directory names that contain numbers

Mkdir dir1 creates a directory called 'dir1''

Mkdir dir1 dir2 creates two directories at the same time

Mkdir-p / tmp/dir1/dir2 create a directory tree

Rm-f file1 deletes a file called 'file1''

Rmdir dir1 deletes a directory called 'dir1''

Rm-rf dir1 deletes a directory called 'dir1' and deletes its contents at the same time

Rm-rf dir1 dir2 deletes both directories and their contents

Mv dir1 new_dir rename / move a directory

Cp file1 file2 copies a file

Cp dir/*. Copy all files in a directory to the current working directory

Cp-a / tmp/dir1. Copy a directory to the current working directory

Cp-a dir1 dir2 copy a directory

Ln-s file1 lnk1 creates a soft link to a file or directory

Ln file1 lnk1 creates a physical link to a file or directory

Find /-name file1 enters the root file system from'/'to search for files and directories

Find /-user user1 searches for files and directories belonging to user 'user1'

Find / home/user1-name\ * .bin searches for files ending with '.bin' in the directory'/ home/user1''

Find / usr/bin-type f-atime + 100 searches for execution files that have not been used in the past 100 days

Find / usr/bin-type f-mtime-10 searches for files that have been created or modified within 10 days

Find /-name\ * .rpm-exec chmod 755'{}'\; search for files ending with '.rpm' and define their permissions

Find /-xdev-name\ * .rpm searches for files ending in '.rpm' and ignores removable devices such as CD-ROMs and Agile drives

Locate\ * .ps looks for files that end with '.ps'-run the 'updatedb' command first

Whereis halt shows the location of a binary, source, or man

Which halt displays the full path to a binary or executable file

Mount / dev/hda2 / mnt/hda2 mount a disk called hda2-make sure the directory'/ mnt/hda2' already exists

Umount / dev/hda2 unmount a disk called hda2-exit from mount point'/ mnt/hda2' first

Fuser-km / mnt/hda2 force uninstall when the device is busy

Umount-n / mnt/hda2 runs the uninstall operation without writing to the / etc/mtab file-useful when the file is read-only or when the disk is full

Mount / dev/fd0 / mnt/floppy mount a floppy disk

Mount / dev/cdrom / mnt/cdrom mount a cdrom or dvdrom

Mount / dev/hdc / mnt/cdrecorder mount a cdrw or dvdrom

Mount / dev/hdb / mnt/cdrecorder mount a cdrw or dvdrom

Mount-o loop file.iso / mnt/cdrom mounts a file or ISO image file

Mount-t vfat / dev/hda5 / mnt/hda5 mounts a Windows FAT32 file system

Mount / dev/sda1 / mnt/usbdisk mounts a usb shortcut or flash memory device

Mount-t smbfs-o username=user,password=pass / / WinClient/share / mnt/share mounts a windows network share

Df-h displays a list of mounted partitions

Ls-lSr | more arranges files and directories by size

Du-sh dir1 estimates the directory 'disk space already used by dir1''

Du-sk * | sort-rn displays the size of files and directories in turn based on capacity

Rpm-Q-a-- qf'{SIZE} t% {NAME} n' | sort-K1Power1n displays the space used by installed rpm packages in turn based on size (fedora, redhat systems)

Dpkg-query-W-fallow packages ${Installed-Size;10} t ${Package} n' | sort-K1Magin1n displays the space used by installed deb packages based on size (ubuntu, debian systems)

The answer to the question about what is the basic command of lunix is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report