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

Find command is used, atime_mtime_ctime, linux and windows files are transferred to each other

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

CTRL+U clears the contents before the cursor

CTRL+E moves the cursor after the line

CTRL+A moves the cursor to the front of the line

Find command:

Look for a directory or file named sshd:

Look for directories or files whose names begin with sshd:

Type parameters:

* d: directory f: file or atime/mtime/ctime b: block file (CD, disk, etc.) c: string file (mouse, keyboard, etc.) l: link file s:socket file (process communication)

Look for the directory named sshd:

Find the file named sshd:

Stat command: view the atime, mtime, ctime of a file or directory

Last visit time / Access time:atime

Last changed time / Modify time (create, change file contents, etc.): mtime

* * Last change time / Change time (change file permissions, etc.): ctime

Changing the contents of a file or directory will change at the same time

Change the file permissions, and the ctime changes:

When the content of the file is changed, the mtime will change (at the same time, the ctime will also change. Ctime records the change time of the file permission, owner, user group, size, and other information. When the content of the file changes, the file size will also change in response, so the ctime will also change):

When accessing the contents of the file, the atime changes:

Find a file or directory through parameters such as atime/mtime/ctime:

* find files or directories in the etc directory that were modified within 5 days.-less than, + greater than

-the minimum unit of mmin:mtime is 1 day, and mmin can query it according to the unit of file or directory modification time:

Find multi-parameter lookup:

The command in the following figure indicates that the .conf file in the / etc directory is of type file and modified within 10 days *

The command in the following figure indicates finding files in the / etc directory or files or directories that were modified within ten days, or files ending in .conf.

*-o parameter: or

Find-inum parameter: find files according to the inode number, which is usually used to find two hard-linked files with the same inode number

Find-exec parameter: executes what is found by find as an object

1.ls-l: use the ls-l command to view trust information for all files that have been modified within 20 minutes under the / root directory found by find

* {} represents a line in the find query result, which is output after ls-l loop traversal,\: escape character, and-exec ends with\;

2.mv: rename the .txt files that have been modified within 20 minutes under the / root directory found by find to xxx.txt.bak

Size parameter: find files based on file size

* find .txt files less than 10k in the / root directory and use ls-lh to view the file size

* find files larger than 10m in the / root directory (M is case sensitive)

When using Xshell or CRT tools, you can transfer files to and from each other on Linux and Windows through the lrzsz command

1. Install the lrzsz package:

2.Linux transfers files to Windows:

1)。 Transfer the test.log file to Windows and enter the sz file name

2)。 Pop up the session window and select the path to save the test.log file

3.Windows transfers files to Linux:

1) enter rz:

2) Pop up the reply window, and select the file to be uploaded:

3) upload completed:

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

Servers

Wechat

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

12
Report