今天在itpub上看到个帖子,大意是使用shell脚本取文件列表,和数据库中一个表中记录的文件名相比较,没有的插入到表里去。
地址:https://www.itpub.net/thread-1186639-1-1.html
实验代码如下:
#建立文件filelist.sh如下:#!/bin/bashsource ~/.bash_proforacle账号ilels -la --full-time | awk '/^-/ {print $6 " " $7 " " $9}' > /home/oracle/filelist.txt
[sql] view plain copy