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

How to analyze the six commands of Linux

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces you how to analyze the six commands of Linux, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Crypt

Well, we've always had crypt. As the name implies, crypt is not a crypt or grave where junk files are stored, but a command to encrypt the contents of a file.

Today, "crypt" is usually implemented as a script: it works by calling a binary program called mcrypt to simulate older crypt commands. Using the mycrypt command directly is a better option.

Mcrypt xEnter the passphrase (maximum of 512 characters) Please use a combination of upper and lower case letters and numbers.Enter passphrase:Enter passphrase:File x was encrypted.

Note that the mcrypt command creates a second file with the extension ".nc".

It does not overwrite the file you are encrypting. The mcrypt command has options for key size and encryption algorithms. You can also specify the key as an option, but the mcrypt command discourages it.

Kill

And the kill command-- not murder, of course, but the commands we use to terminate the process, depending on what is needed to terminate them properly. Of course, Linux doesn't stop there. Instead, it has a variety of kill commands to use on your command line.

We have kill, pkill, killall, killpg, rfkill, skill (see es-kill), tgkill, tkill and xkill.

$killall runme [1] Terminated. / runme [2] Terminated. / runme [3]-Terminated. / runme [4] + Terminated. / runme

Shred

The Linux system also supports a command called shred. The shred command overwrites files to hide previous contents and ensures that they cannot be recovered using the hard disk recovery tool. Remember: the rm command basically removes file references from directory files, but does not necessarily erase or overwrite content from disk. The shred command is the content of the overwritten file.

$shred dupes.txt$ more dupes.txt ▒ o A ▒▒ 9 ▒ lm ▒ o ▒ 1 '▒▒ f ▒ f ▒▒▒ I ▒▒ h ^} & ▒▒▒ {▒▒

Zombies

Although zombies (zombie process) is not a command, it is deeply ingrained on Linux systems. Zombies is basically the wreckage of a death process that has not been completely removed.

Processes should not run in this way-- allowing dead processes to linger, rather than just letting them die and enter digital paradise, so the existence of zombies indicates that there is some flaw in the process that left them.

An easy way to check to see if any zombie processes remain on your system is to look at the title line of the top command.

How scary! It shows three zombie processes.

$toptop-18:50:38 up 6 days, 6:36, 2 users, load average: 0.00,0.00, 0.00Tasks: 171total, 1 running, 167sleeping, 0 stopped, 3 zombieat midnight

The souls of the dead wander from sunset until late at night. Linux allows users to track whether they have left or not with the "at midnight" command. At is used to schedule tasks that will be run at the next specified time, similar to one-time scheduled tasks (cron).

$at midnightwarning: commands will be executed using / bin/shat > echo 'the spirits of the dead have left'at > job 3 at Thu Oct 31 00:00:00 2017

Daemons

Linux systems are also highly dependent on daemons (daemon), which run in the background and provide many of the system's functions. The names of many daemons end with "d" This "d" stands for "daemon" and indicates that the process is running all the time and supports some important function. Other daemons spell the word "daemon".

$ps-ef | grep sshdroot 1142 10 Oct19? 00:00:00 / usr/sbin/sshd-Droot 25342 1142 0 18:34? 00:00:00 sshd: shs [priv] $ps-ef | grep daemon | grep-v grepmessage+ 790 10 Oct19? 00:00:01 / usr/bin/dbus-daemon-- system-- address=systemd:-- nofork-- nopidfile-- systemd-activationroot 836 10 Oct19? 00:00:02 / usr/lib/accountsservice/accounts-daemon what is Linux system Linux A UNIX-like operating system with free use and free transmission Is a POSIX-based multi-user, multi-tasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

This is the end of the 6 commands on how to analyze Linux. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

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

Development

Wechat

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

12
Report