首页 > 系统相关 >安卓shell 移动某个时间之后的文件到另外一个文件夹 命令记录

安卓shell 移动某个时间之后的文件到另外一个文件夹 命令记录

时间:2024-07-28 18:28:32浏览次数:9  
标签:emulated shell Camera DCIM 安卓 storage 文件夹 mtime find

find /storage/emulated/0/DCIM/Camera -maxdepth 1 -mtime -1 -type f -exec ls -l {} \;    供先测试一下

ls -l /storage/emulated/0/DCIM/Camera.new | wc -l   供先测试一下

find /storage/emulated/0/DCIM/Camera -maxdepth 1 -mtime -1 -type f -exec mv -iv "{}" /storage/emulated/0/DCIM/Camera.new \;

 

 

 

 

 

 

find --help


usage: find [-HL] [DIR...] [<options>]

Search directories for matching files.
Default: search "." match all -print all matches.

-H  Follow command line symlinks         -L  Follow all symlinks

Match filters:
-name  PATTERN  filename with wildcards   -iname      case insensitive -name
-path  PATTERN  path name with wildcards  -ipath      case insensitive -path
-user  UNAME    belongs to user UNAME     -nouser     user ID not known
-group GROUP    belongs to group GROUP    -nogroup    group ID not known
-perm  [-/]MODE permissions (-=min /=any) -prune      ignore contents of dir
-size  N[c]     512 byte blocks (c=bytes) -xdev       only this filesystem
-links N        hardlink count            -atime N[u] accessed N units ago
-ctime N[u]     created N units ago       -mtime N[u] modified N units ago
-newer FILE     newer mtime than FILE     -mindepth # at least # dirs down
-depth          ignore contents of dir    -maxdepth # at most # dirs down
-inum  N        inode number N            -empty      empty files and dirs
-type [bcdflps]   (block, char, dir, file, symlink, pipe, socket)
-context PATTERN  security context

Numbers N may be prefixed by a - (less than) or + (greater than). Units for
-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).

Combine matches with:
!, -a, -o, ( )    not, and, or, group expressions

Actions:
-print   Print match with newline  -print0    Print match with null
-exec    Run command with path     -execdir   Run command in file's dir
-ok      Ask before exec           -okdir     Ask before execdir
-delete  Remove matching file/dir

Commands substitute "{}" with matched file. End with ";" to run each file,
or "+" (next argument after "{}") to collect and run with multiple files.

cas:/storage/emulated/0/DCIM/Camera $ find --version
toybox 0.8.0-android

 

 

history命令,输出adb shell的历史命令

cas:/storage/emulated/0/DCIM/Camera $ history
1       cd /storage/emulated/0/DCIM/
2       ls
3       cd Camera
4       ls -l | wc -l
5       find . -mindepth 1 -maxdepth 1 -mtime -3
6       find --help
7       cd ..
8       find
9       
10      cd /storage/emulated/0/DCIM/
11      ls
12      cd Camera
13      ls -l | wc -l
14      find . -mindepth 1 -maxdepth 1 -mtime -1 -exec ls -ld "{}" \;

标签:emulated,shell,Camera,DCIM,安卓,storage,文件夹,mtime,find
From: https://www.cnblogs.com/hhdom/p/18328602

相关文章

  • 安卓单机游戏:龙之矛内置菜单,【免费分享】白嫖!
    龙之矛是一款传统的横版卷轴RPG游戏。在游戏中玩家将探索被梦魇蹂躏的世界,和朋友一起猎杀强大的BOSS,如果你杀死了boss,那么你可以制作具有boss力量的装备。游戏内所有装备都有独特的外观,你可以用各种华丽的装备打扮你的角色。英雄会通过冒险逐渐变强,当你的角色等级更高时,学习新......
  • 【王国保卫战5:联盟】安卓/ios/pc单机游戏,无限钻
    王国保卫战5:联盟是塔防策略类游戏《王国保卫战》系列的续作。继承了前作的经典玩法和特色,并在此基础上进行了创新和拓展。玩家需要布置手中的单位来对抗汹涌攻击过来的敌人。通过召唤援军、指挥等方式,让防守方的战力得到最大程度发挥。游戏特点1、游戏设计了16个挑战性关卡......
  • Microsoft.PowerShell.Commands.Utility.Resources.dll文件丢失导致程序无法运行问题
    其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个Microsoft.PowerShell.Commands.Utility.Res......
  • Linux工作原理11 Shell脚本
    11shell脚本如果你能在shell中输入命令,你就能编写shell脚本。shell脚本(也称为Bourneshell脚本)是写在文件中的一系列命令;shell会从文件中读取这些命令,就像在终端中输入命令一样。11.1shell脚本基础Bourneshell脚本一般以下面一行开始,表示/bin/sh程序应执行脚本文......
  • 【shell脚本快速一键部署项目】
    目录一、环境拓扑图二、主机环境描述三、注意四、需求描述五、shell代码的编写六、总结一、环境拓扑图二、主机环境描述主机名主机地址需要提供的服务content.exam.com172.25.250.101提供基于httpd/nginx的YUM仓库服务ntp.exam.com172.25.250.102提供基于Chrony......
  • 2023.7.2-3-4Mssql xp_cmdshell提权
    1.概念Mssql和SQLsever的一个产品的不同名称。都属于微软公司旗下。而上述Mssqlxp_cmdshell提权也属于数据库提权的一种。主要依赖于sqlserver自带的存储过程。1.1xp_cmdshell提权扩展存储过程中xp_cmdshell是一个开放接口,可以让sqlsever调用cmd命令。此过程在SQLsever......
  • shell编程
    一、shell基础1.shell概念shell英文翻译过来是外壳的意思,作为计算机语言来理解可以认为它是操作系统的外壳。可以通过shell命令来操作和控制操作系统,比如Linux中的shell命令就包括ls、cd、pwd等等。shell在内核的基础上编写的一个应用程序,它连接了用户和Linux内核,......
  • 基于宝塔面板的雨云自动签到shell脚本教程(亲测可用)
    第一步:雨云API获取    ①登录雨云用户后,鼠标移到用户头像    ②在出来的菜单中点击“账户设置”    ③在页面中找到左边一栏,点击“API密钥”    ④若之前没有使用过API密钥,右边的栏会是空的,那就点击右边橘黄色的“重新生成”按钮  ......
  • shell脚本学习以及案列练习
    (一)用shell脚本自动化部署安装nginx首先创建一个目录,用于存放该脚本 mkdir-p/root/shell然后创建脚本文件vim/root/shell/install_nginx.sh再给脚本文件加上执行权限 chmod+x /root/shell/install_nginx.sh然后执行,就可自动安装nginx了到这里就编译成功了(二)s......
  • C++文件系统操作6 - 跨平台实现文件和文件夹的拷贝
    1.关键词2.fileutil.h3.fileutil.cpp4.filesystem_win.h5.filesystem_win.cpp6.filesystem_unix.cpp7.源码地址1.关键词C++文件系统操作拷贝文件拷贝文件夹跨平台2.fileutil.h#pragmaonce#include<string>#include<cstdio>#include<cstdint>#i......