首页 > Linux操作系统 > Linux操作系统 > utl_file.fremove
utl_file包中的fremove过程可以删除某个目录下的文件
[oracle@centos tmp]$ touch haha
[oracle@centos tmp]$ ll haha
-rw-r--r-- 1 oracle oinstall 0 Aug 14 20:12 haha
SQL> exec utl_file.fremove('/tmp','haha');
PL/SQL procedure successfully completed.
[oracle@centos tmp]$ ll haha
ls: haha: No such file or directory
执行以上过程之前,需要设置utl_file_dir参数。UTL_FILE_DIR lets you specify one or more directories that Oracle should use for PL/SQL file I/O.
SQL> show parameter utl
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
create_stored_outlines string
utl_file_dir string /tmp
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25361369/viewspace-704828/ ,如需转载,请注明出处,否则将追究法律责任。