Common Linux commands Daquan (very complete!!!)


Common Linux commands Daquan (very complete!!!)

I’ve been dealing with Linux lately, and it feels good. I think Linux is more troublesome than Windows because many things need to be controlled by commands. Of course, this is why many people like linux. It’s short but powerful. I will enumerate the orders I have learned for your reference only:


system information
Processor Architecture of Arch Display Machine
Processor Architecture of uname-m Display Machine
Uname-r shows the kernel version in use
Dmidecode-q Display Hardware System Components (SMBIOS/DMI)
Hdparm-i/dev/hda lists the architectural characteristics of a disk
Hdparm-tT/dev/sda performs testable read operations on disk
Cat/proc/cpuinfo displays CPU info information
Cat/proc/interrupts display interrupt
Cat/proc/meminfo Check Memory Use
Cat/proc/swaps shows which swaps are used
Cat/proc/version displays the version of the kernel
Cat/proc/net/dev Display Network Adapter and Statistics
Cat/proc/mounts displays loaded file systems
Lspci-tv lists PCI devices
Lsusb-tv Display USB Device
Date Displays System Date
Cal 2007 shows the calendar for 2007
Date 041217002007.00 Sets Date and Time – Month, Day, Time, Year, Second
Clock-w saves time changes to BIOS

Shutdown (shutdown, restart and logout of the system)
Shutdown-h now shutdown system
Init 0 shuts down the system
Telinit 0 shuts down the system
Shutdown-h hours: minutes & shutdown system at scheduled time
Shutdown-c cancels shutdown at scheduled time
Shutdown-r now restart
Reboot restart
Logout cancellation

Documents and directories 
Cd/home enters the’/ home’directory’
Cd… Returns to the previous directory
Cd. /. Returns to the previous two levels of directory
CD enters personal home directory
Cd~user1 enters the personal home directory
CD – Return to the last directory
PWD displays working paths
Ls View the files in the directory
Ls-F Views Files in the Directory
Ls-l displays details of files and directories
Ls-a Displays Hidden Files
Ls * [0-9]* Displays file and directory names containing numbers
Tree displays the tree structure of files and directories starting from the root directory
Lstree displays the tree structure of files and directories starting from the root directory
MKDIR dir1 creates a directory called’dir1′
MKDIR dir1 dir2 creates two directories at the same time
Create a directory tree with mkdir-p/tmp/dir1/dir2
Rm-f file 1 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 two directories and their contents at the same time
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
Copy a directory with CP-A dir1 dir2
Ln-S file 1 lnk1 creates a soft link to a file or directory
Ln file1 lnk1 creates a physical link to a file or directory
Touch-t 0712250000 file1 Modify the timestamp of a file or directory – (YYMMDDhhmm)
file file1 outputs the mime type of the file as text 
Iconv-l lists known codes
iconv -f fromEncoding -t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding. 
find . -maxdepth 1 -name *.jpg -print -exec convert “{}” -resize 80×60 “thumbs/{}” \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) 

File Search 
Find / name file 1 enters the root file system from’/’to search for files and directories
Find / user user1 searches for files and directories belonging to user’s’user1′
Find/home/user1-name*.bin searches for files with the end of’.bin’in the directory’/home/user1′.
Find/usr/bin-type f-atime+100 to search for execution files that have not been used in the past 100 days
Find/usr/bin-type f-mtime-10 searches for files 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 with’. rpm’, ignoring removable devices such as CD-ROMs, shortcuts, etc.
Loce*.ps Finds Files Ending with’.ps’- Run the’updatedb’ command first
Whereis halt shows the location of a binary file, source code, or man
Which halt displays the full path of a binary or executable file

Mount a file system 
Mount / dev / hda2 / MNT / hda2 mounts a disk called hda2 – determines that the directory’/ MNT / hda2’already exists
Umount/dev/hda2 uninstalls a disk called hda2-exits from Mount point’/mnt/hda2′.
Forced unloading of fuser-km/mnt/hda2 when equipment is busy
Umount-n/mnt/hda2 runs the uninstall operation without writing to the / etc/mtab file-very useful when the file is read-only or when the disk is full.
Mount/dev/fd0/mnt/floppy mounts a floppy disk
Mount/dev/cdrom/mnt/cdrom mounts a CDROM or dvdrom
Mount/dev/hdc/mnt/cdrecore mounts a CDRw or dvdrom
Mount/dev/hdb/mnt/cdrecorder mounts a CDRw or dvdrom
Mount-o loop file.iso/mnt/cdrom mounts a file or ISO mirror 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 device
Mount-t smbfs-o username = user, password = pass//WinClient/share/mnt/share mounts a Windows network share

disk space
Df-h displays a list of partitions that have been mounted
Ls-lSr | more Ranks Files and Directories by Size
Du-sh dir1 estimates the disk space already used in the directory’dir1′
Du-sk* | sort-rn displays file and directory sizes in turn based on capacity size
Rpm-q-a — qf’% 10 {SIZE} t% {NAME} N’| sort-k1, 1n displays the space used by installed RPM packages in turn according to size (fedora, RedHat system)
Dpkg-query-W-f=’${Installed-Size; 10} t${Package} N’| sort-k1, 1n shows the space used by installed DEB packages based on size (ubuntu, Debian system)

User and Group
Groupadd group_name creates a new user group
Groupdel group_name deletes a user group
Groupmod-n new_group_name old_group_name renames a user group
Useradd-c “Name Surname” – G admin-d/home/user1-s/bin/bash user1 creates a user belonging to the “admin” user group
Useradd user1 creates a new user
Userdel-r user1 deletes a user (‘-r’excludes the home directory)
Usermod-c “User FTP” – G system-d/ftp/user1-s/bin/nologin user1 to modify user attributes
Passwd Modify Password
Passwd user1 modifies a user’s password (only root is allowed to execute)
Chage-E 2005-12-31 user1 sets the expiration time of user password
Pwck checks’/etc/passwd’file format and syntax corrections as well as existing users
Grpck checks’/etc/passwd’file format and syntax corrections as well as existing groups
Newgrp group_name logs into a new group to change the default group of newly created files

File permissions – use “+” to set permissions and “-” to cancel
Ls-lh display permission
Ls/tmp | pr-T5-W $COLUMNS divides the terminal into five columns for display
Chmod u g o + R W x directory 1 sets the permissions of owner (u), group (g) and others (o) of the directory to read (r), write (w), and execute (x)
Chmod g o-rwx directory 1 deletes read and write permissions of groups (g) and others (o) to directories
Chown user1 file1 changes the owner properties of a file
Chown-R user1 directory1 changes the owner property of a directory and changes the properties of all files in the directory at the same time.
Chgrp group 1 file 1 changes the group of files
Chown user 1: group 1 file 1 changes the owner and group attributes of a file
Find/perm-u+s lists all files in a system that use SUID control
Chmod u+s/bin/file1 sets the SUID bit of a binary file – the user running the file is also given the same privileges as the owner.
Chmod u-s/bin/file1 disables the SUID bit of a binary file
Chmod g+s/home/public sets the SGID bit of a directory – similar to SUID, but this is for directories.
Chmod g-s/home/public disables the SGID bit of a directory
Chmod o+t/home/public sets the STIKY bit of a file – only legal owners are allowed to delete files
Chmod o-t/home/public disables STIKY bits of a directory

Special attributes of files – use “+” to set permissions and “-” to cancel
Chattr+a file1 only allows additional reading and writing of files.
Chattr + C file 1 allows this file to be automatically compressed/decompressed by the kernel
When chattr + D file 1 backs up the file system, the dump program will ignore the file.
Chattr + I file 1 is set to an immutable file and cannot be deleted, modified, renamed or linked.
Chattr + s file 1 allows a file to be safely deleted
Once the application program writes this file, the system writes the modified result to disk immediately.
Chattr + U file1 If the file is deleted, the system will allow you to restore the deleted file later.
Lsattr displays special properties

Packing and Compressing Files
Bunzip2 file 1.bz2 extracts a file called’file1.bz2′.
Bzip2 file1 compresses a file called’file1′
Gunzip file 1.gz Unzips a file called’file1.gz’
Gzip file 1 compresses a file called’file1′
Gzip-9 file1 maximum compression
Rar a file1.rar test_file creates a package called’file1.rar’
Rar a file1.rar file1 File2 dir1 simultaneously compresses’file1′,’file2’and directory’dir1′.
Rar x file 1. rar decompression rar package
Unrar x file 1.rar decompresses rar package
Tar-cvf archive.tar file 1 creates an uncompressed tarball
Tar-cvf archive.tar file1 File2 dir1 creates an archive containing’file1′,’file2’and’dir1′.
Tar-tf archive.tar displays the contents of a package
Tar-xvf archive.tar releases a package
Tar-xvf archive.tar-C/tmp releases compressed packages into the / tmp directory
Tar-cvfj archive.tar.bz2 dir1 creates a compression package in bzip2 format
Tar-jxvf archive.tar.bz2 decompresses a compression package in bzip2 format
Tar-cvfz archive.tar.gz dir1 creates a gzip format compression package
Tar-zxvf archive.tar.gz decompresses a gzip format compression package
Zip file1 creates a zip-formatted compression package
Zip-r file file 1 file 2 dir1 compresses several files and directories into a ZIP format compression package at the same time
Unzip file decompresses a ZIP format compression package

RPM package – (Fedora, Redhat and similar systems) 
Rpm-ivh package.rpm installs an RPM package
Rpm-ivh — nodeeps package. RPM installs an RPM package without ignoring dependency warnings
Rpm-U package.rpm updates an RPM package without changing its configuration file
Rpm-F package.rpm updates a RPM package that determines that it has been installed
Rpm-e package_name.rpm Deletes an RPM package
All installed RPM packages in rpm-qa display system
Rpm-qa | grep httpd displays RPM packages with the word “httpd” in all names
Rpm-qi package_name gets special information about an installed package
Rpm-qg “System Environment/Daemons” displays the RPM package of a component
Rpm-ql package_name displays a list of files provided by an installed RPM package
Rpm-qc package_name displays a list of configuration files provided by an installed RPM package
Rpm-q package_name — whatrequires displays a list of dependencies with an RPM package
Rpm-q package_name — what provides shows the volume of an RPM package
Rpm-q package_name — scripts display scripts executed during installation/deletion
Rpm-q package_name — changelog displays the modification history of an RPM package
Rpm-qf/etc/httpd/conf/httpd.conf confirms which RPM package provides the file given
Rpm-qp package.rpm-l displays a list of files provided by an unpacked rpm package.
RPM — Import/media/cdrom/RPM-GPG-KEY Import Public Key Digital Certificate
RPM — checksig package. RPM confirms the integrity of an RPM package
Rpm-qa gpg-pubkey confirms the integrity of all installed RPM packages
Rpm-V package_name checks file size, permission, type, owner, group, MD5 checks, and final modification time
Rpm-Va Checks all installed RPM packages in the system-Use with care
Rpm-Vp package.rpm confirms that an RPM package is not installed.
Rpm2cpio package. rpm | CPIO — extract — make-directories * bin * run executable files from an RPM package
Rpm-ivh/usr/src/redhat/RPMS/`arch`package.rpm installs a built package from an RPM source
Rpmbuild — rebuild package_name.src.rpm builds an RPM package from an RPM source

YUM package upgrade – (Fedora, Red Hat and similar systems)
Yum install package_name downloads and installs an RPM package
Yum localinstall package_name.rpm will install an RPM package and use your own software repository to resolve all dependencies for you.
Yum update package_name.rpm updates all installed RPM packages in the current system
Yum update package_name updates an RPM package
Yum remove package_name deletes an RPM package
Yum list lists all packages installed in the current system
Yum search package_name searches for packages in RPM warehouse
Yum clean packages clean RPM cache delete downloaded packages
Yum clean headers delete all header files
Yum clean all deletes all cached packages and headers

DEB package (Debian, Ubuntu and similar systems)
Dpkg-i package.deb install/update a DEB package
Dpkg-r package_name deletes a DEB package from the system
All DEB packages installed in the dpkg-l display system
Dpkg-l | grep httpd displays DEB packages with the word “httpd” in all names
Dpkg-s package_name obtains information about a special package already installed in the system
Dpkg-L package_name displays the list of files provided by a DEB package installed in the system
Dpkg — contents package. DEB displays a list of files provided by a package that has not yet been installed
Dpkg-S/bin/ping confirms which DEB package provided the file

APT software tools (Debian, Ubuntu and similar systems)
Apt-get install package_name install/update a DEB package
Apt-cdrom install package_name installs/updates a DEB package from CD
Software packages in the apt-get update upgrade list
Apt-get upgrade upgrades all installed software
Apt-get remove package_name deletes a DEB package from the system
Apt-get check confirms that the dependent software repository is correct
Apt-get clean cleans the cache from downloaded packages
Apt-cache search searched-package returns the package name containing the search string to be searched

view file contents 
Cat file1 looks forward at the contents of the file from the first byte.
TAC file 1 looks back at the contents of a file from the last line.
More File1 Views the Content of a Long File
Less file 1 is similar to the’more’command, but it allows the same reverse operation in a file as the forward operation.
Head-2 file1 looks at the first two lines of a file
Tail-2 file1 looks at the last two lines of a file
Tail-f/var/log/messages view the contents added to a file in real time

text processing
cat file1 file2 … | command <> file1_in.txt_or_file1_out.txt general syntax for text manipulation using PIPE, STDIN and STDOUT 
Cat file1 | command (sed, grep, awk, grep, etc.) > result. TXT merges the detailed text of a file and writes the introduction to a new file.
Cat file1 | command (sed, grep, awk, grep, etc.) > result. TXT merges the detailed text of a file and writes the profile into an existing file.
Grep Aug/var/log/messages finds the key word “Aug” in the file’/var/log/messages’.
Grep ^ Aug/var/log/messages finds the word “Aug” in the file’/var/log/messages’.
Grep [0-9]/var/log/messages select all lines containing numbers in the’/var/log/messages’file
Grep Aug-R/var/log/* Search for the string “Aug” in the directory’/var/log’and subsequent directories
Sed’s/stringa1/stringa2/g’example.txt replaces “string1” in the example.txt file with “string2”
Sed’/^$/d’example.txt deletes all blank lines from the example.txt file
Sed’/ *#/d; /^$/d’example.txt deletes all comments and blank lines from the example.txt file
Echo’esempio’| tr’ [: lower:]'[: upper:]’ merges the contents of the upper and lower cells
Sed-e’1d’result.txt excludes the first line from the file example.txt
Sed-n’/stringa1/p’view rows containing only the word “string1”
Sed-e’s/*$/’example.txt Deletes the last blank character of each line
Sed-e’s/stringa1//g’example.txt deletes only the word “string1” from the document and retains the rest
Sed-n’1,5p; 5q’example.txt View lines 1 through 5
Sed-n’5p; 5q’example.txt View line 5
Sed-e’s/00*/0/g’example.txt Replaces multiple zeros with a single zeros
Cat-n file 1 indicates the number of rows in the file
Cat example.txt | awk’NR%2==1’Delete all even lines in the example.txt file
Echo a B C | awk'{print $1}’view the first column of a row
Echo a B C | awk'{print $1, $3}’view the first and third columns of a line
Pase file 1 file 2 merges two files or two columns
Pase-d’+’file1 file 2 combines two files or two columns of content, distinguished by “+”
Sort file 1 file 2 sort the contents of two files
Sort file1 File2 | uniq takes out the union of two files (duplicate rows retain only one)
Sort file 1 file 2 | uniq-u deletes the intersection and leaves other rows
Sort file 1 File2 | uniq – D takes out the intersection of two files (leaving only the files that exist in both files)
Comparing the contents of two files, comm-1 file1 File2 deletes only the contents contained in’file1′.
Comparing the contents of two files, comm-2 file1 File2 deletes only the contents contained in’file2′.
Comparing the contents of two files, comm-3 file1 File2 deletes only the common parts of two files.

Character Settings and File Format Conversion
Dos2unix filedos.txt fileunix.txt Converts the format of a text file from MSDOS to UNIX
Unix DOS fileunix.txt filedos.txt Converts the format of a text file from UNIX to MSDOS
HTML < page.txt > page.html converts a text file into HTML
Recode-l | more displays all permissible conversion formats

Analysis of File System
Bad blocks-v/dev/hda1 Check bad magnetic blocks on disk hda1
Fsck/dev/hda1 repair/check the integrity of Linux file system on hda1 disk
Fsck.ext2/dev/hda1 repair/check the integrity of EXT2 file system on hda1 disk
E2fsck/dev/hda1 repair/check the integrity of EXT2 file system on hda1 disk
E2fsck-j/dev/hda1 repair/check the integrity of ext3 file system on hda1 disk
Fsck.ext3/dev/hda1 repair/check the integrity of ext3 file system on hda1 disk
Fsck.vfat/dev/hda1 repair/check the integrity of fat file system on hda1 disk
Fsck.msdos/dev/hda1 repair/check the integrity of DOS file system on hda1 disk
Dosfsck/dev/hda1 repair/check the integrity of DOS file system on hda1 disk

Initialize a file system 
Mkfs/dev/hda1 creates a file system in the hda1 partition
Mke2fs/dev/hda1 creates a Linux EXT2 file system in the hda1 partition
Mke2fs-j/dev/hda1 creates a Linux ext3 (log type) file system in the hda1 partition
Mkfs-t VFAT 32-F/dev/hda1 creates a FAT32 file system
Fdformat-n/dev/fd0 formats a floppy disk
Mkswap/dev/hda3 creates a swap file system

SWAP File System 
Mkswap/dev/hda3 creates a swap file system
Swapon/dev/hda3 Enables a new swap file system
Swapon/dev/hda2/dev/hdb3 Enables two swap partitions

Dump-0aj-f/tmp/home0.bak/home to make a full backup of the’/home’directory
Dump-1aj-f/tmp/home0.bak/home makes an interactive backup of the’/home’directory
Restore-if/tmp/home0.bak restores an interactive backup
Rsync-rogpav — directories on both sides of delete/home/tmp synchronization
Rsync-rogpav-e ssh–delete/home ip_address:/tmp through SSH channel Rsync
Rsync-az-e SSH — delete ip_addr:/home/public/home/local synchronizes a remote directory to a local directory by SSH and compression
Rsync-az-e SSH — delete/home/local ip_addr:/home/public synchronizes local directories to remote directories through SSH and compression
DD BS = 1M if=/dev/hda | GZ IP | SSH [email protected]_addr’dd of = hda.gz’performs a backup operation of local disks on the remote host via SSH
DD if=/dev/sda of=/tmp/file1 backup disk content to a file
Ta-Puf backup.tar/home/user performs an interactive backup operation on the’/home/user’directory
(cd/tmp/local/& tar C.)| ssh-C [email protected]_addr’cd/home/share/ & Tar x-p’copy a directory content in a remote directory through SSH
(tar c/home) | ssh-C [email protected]_addr’cd/home/backup-home & & Tar x-p’replicates a local directory in a remote directory through SSH
Tar CF -. | (cd / TMP / backup; tar XF -) Copy a directory locally to another location, retaining original permissions and links
Find/home/user1-name’*.txt’| xargs cp-av — target-directory=/home/backup/ – parents finds and copies all files ending with’.txt’ from one directory to another.
Find/var/log-name’*.log’| tar CV — files-from=-| bzip2 > log.tar.bz2 Finds all files ending with’.log’ and makes a bZIP package.
DD if=/dev/hda of=/dev/fd0 bs=512 count=1 makes an action of copying MBR (Master Boot Record) content to floppy disk
DD if=/dev/fd0 of=/dev/hda bs=512 count=1 Recovering MBR content from a backup that has been saved to a floppy disk

Compact disc
Cdrecord-v gracetime=2 dev=/dev/cdrom-eject blank=fast-force empties a replicable CD-ROM content
Mkisofs/dev/cdrom > cd.iso Creates an ISO image file of a CD on disk
Mkisofs/dev/cdrom | gzip > cd_iso.gz creates a compressed CD-ROM ISO image file on disk
Mkisofs-J-allow-lead-dots-R-V “Label CD” -iso-level 4-o. / cd.iso data_cd creates an ISO image file of a directory
Cdrecord-v dev=/dev/cdrom cd.iso burns an ISO image file
Gzip-dc cd_iso.gz | CDRECORD dev=/dev/cdrom – Recording a compressed ISO image file
Mount-o loop cd.iso/mnt/iso mounts an ISO image file
Cd-paranoia-B from a CD to a wav file
Cd-paranoia – “-3” from a CD to a wav file (parameter-3)
CDRECORD — scanbus scan bus to identify SCSI channels
DD if=/dev/hdc | md5sum verifies the md5sum encoding of a device, such as a CD

Network – (Ethernet and WIFI Wireless)) 
Ifconfig eth0 displays the configuration of an Ethernet card
Ifup eth0 enables a’eth0’network device
Ifdown eth0 disables a’eth0’network device
Ifconfig eth0 netmask controls IP address
Ifconfig eth0 promisc sets’eth0’in hybrid mode to sniffing packets
Dhclient eth0 enables’eth0’in DHCP mode
route -n show routing table 
route add -net 0/0 gw IP_Gateway configura default gateway 
route add -net netmask gw configure static route to reach network ‘’ 
route del 0/0 gw IP_gateway remove static route 
echo “1” > /proc/sys/net/ipv4/ip_forward activate ip routing 
hostname show hostname of system 
host lookup hostname to resolve name to ip address and viceversa
nslookup lookup hostname to resolve name to ip address and viceversa
ip link show show link status of all interfaces 
mii-tool eth0 show link status of ‘eth0’ 
ethtool eth0 show statistics of network card ‘eth0’ 
netstat -tup show all active network connections and their PID 
netstat -tupl show all network services listening on the system and their PID 
tcpdump tcp port 80 show all HTTP traffic 
iwlist scan show wireless networks 
iwconfig eth1 show configuration of a wireless network card 
hostname show hostname 
host lookup hostname to resolve name to ip address and viceversa 
nslookup lookup hostname to resolve name to ip address and viceversa 
whois lookup on Whois database 


JPS Tool

JPS (Java Virtual Machine Process Status Tool) is a command provided by JDK 1.5 to display the PID of all current Java processes. It is simple and practical. It is very suitable for simple inspection of current Java processes on linux/unix platform.

I think many people have used the PS command in UNIX system. This command is mainly used to show the current system process, which processes, and their ID. The same is true of jps, which displays the current system’s java process and its ID number. It allows us to see how many Java processes we have started (because each Java program will have a single instance of a Java virtual machine), and their process numbers (in preparation for the next few programs), and to view the detailed startup parameters of these processes through opt.

Usage: Call JPS on the current command line (JAVA_HOME, if not, in the directory of the program).

JPS is stored in JAVA_HOME/bin/jps. For convenience, add JAVA_HOME/bin/to Path.

$> jps
23991 Jps
23789 BossMain
23651 Resin


The commonly used parameters are as follows:

– Q only shows pid, not class name, jar file name and parameters passed to main method
$>  jps -q

– M output parameters passed to main method, which may be null on embedded JVM

$> jps -m
28715 Jps -m
23789 BossMain
23651 Resin -socketwait 32768 -stdout /data/aoxj/resin/log/stdout.log -stderr /data/aoxj/resin/log/stderr.log

– The full package name of the main class of the output application or the full path name of the jar file of the application

$> jps -l
23789 com.asiainfo.aimc.bossbi.BossMain
23651 com.caucho.server.resin.Resin

– Parameters passed to JVM by V output

$> jps -v
23789 BossMain
28802 Jps -Denv.class.path=/data/aoxj/bossbi/twsecurity/java/trustwork140.jar:/data/aoxj/bossbi/twsecurity/java/:/data/aoxj/bossbi/twsecurity/java/twcmcc.jar:/data/aoxj/jdk15/lib/rt.jar:/data/aoxj/jd

k15/lib/tools.jar -Dapplication.home=/data/aoxj/jdk15 -Xms8m
23651 Resin -Xss1m -Dresin.home=/data/aoxj/resin -Dserver.root=/data/aoxj/resin -Djava.util.logging.manager=com.caucho.log.LogManagerImpl –

Sudo JPS sees the largest number of processes


Lists all JVM instances of remote server machine, using RMI protocol, the default connection port is 1099

(Provided that the remote server provides jstatd services)

Note: JPS command has a very bad place, it seems that only the current user’s java process can be displayed, to show other users or can only use UNIX / Linux PS command.


For details, please refer to Sun’s official documents.

Microsoft Windows networks (SAMBA) 
nbtscan ip_addr netbios name resolution 
nmblookup -A ip_addr netbios name resolution 
smbclient -L ip_addr/hostname show remote shares of a windows host 
smbget -Rr smb://ip_addr/share like wget can download files from a host windows via smb 
mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share

Man must depend on himself

Recommended Today

Hadoop MapReduce Spark Configuration Item

Scope of application The configuration items covered in this article are mainly for Hadoop 2.x and Spark 2.x. MapReduce Official documents…Lower left corner: mapred-default.xml Examples of configuration items name value description mapreduce.job.reduce.slowstart.completedmaps 0.05 Resource requests for Reduce Task will not be made until the percentage of Map Task completed reaches that value. mapreduce.output.fileoutputformat.compress false […]