Linux finds files over 100M in the current directory and moves to TMP

Source: Internet
Author: User

The command is as follows:

find . -type F- + 100 m-exec mv {}/tmp/\;

Description

-type: File type, followed by F refers to the file, if the directory is D

-size: File size, +100m refers to more than 100m,-is less than, no symbol is equal to

-exec: Pipeline command to pass the previous query results to the following command

{}: Refers to the result of the query passed earlier

\;: Used in conjunction with previous exec, do not write prompt: find:missing argument to '-exec '


If you only want to query the results, you only need to use the first half of the-exec to

Linux finds files over 100M in the current directory and moves to TMP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.