rm 刪除檔案到垃圾箱

2021-05-21 21:54:35 字數 887 閱讀 2638

#e-mail:[email protected]

#將下列的**新增到使用者下的.bashrc中,這樣這段**就可以發揮作用了。如果是在終端輸入的那麼輸入**後退出終端在開啟終端,這段**就生效了。有一部分是參照網上的**。

#具體功能如下:

#rm

#rm -f

#rm -r

#rm -rf

#rl 檢視**站的內容

#rc 清空**站

#ur 後面加引數恢復**站的檔案到當前目錄下

mkdir -p ~/.trash

alias rm=trash

alias rc=clean_trash

alias rl='ls ~/.trash'

alias ur=undelfile

undelfile()

trash()

clean_trash()

#修改上述**,增加如果**站裡已經有了你刪除的檔案當再次刪除同樣的檔案時,原來的檔案將變成檔名+替換的時間。#

#trash funnction

#author: yan xiaofeng

mkdir -p ~/.trash

alias rm=trash

alias rc=clean_trash

alias rl='ls ~/.trash'

alias ur=undelfile

#current_file_num=`ls -l | wc -l`

#file_removed=0

#current_dir=`pwd`

#i=0

trash=~/.trash

undelfile()

trash()

clean_trash()

STM32智慧型定位稱重垃圾箱設計

內容 stm32最小系統板 2 gps北斗雙模定位模組 稱重模組 usb ttl模組 軟體內容 flymcu為程式燒錄軟體 xcom為串列埠除錯軟體 ch340驅動和cp210x驅動qudong為usb ttl驅動軟體 先安裝usb ttl驅動軟體和兩個usb ttl驅動。usb ttl模組 由於s...

python rm 條件 刪除檔案 rm

附錄a 練習14 刪除檔案 rm 這節練習中,你將學會如何使用rm命令刪除乙個檔案。做到這些 linux cd temp ls uncool.txt iamcool.txt neat.txt something thefourthfile.txt rm uncool.txt ls iamcool.t...

掌握rm命令刪除檔案

linux rm命令用於刪除乙個檔案或者目錄。檔案一旦通過rm命令刪除,則無法恢復,所以必須格外小心地使用該命令。語法 rm options name.options 引數 i刪除前逐一詢問確認。f強制刪除。忽略不存在的檔案,不提示確認。r將目錄及以下之檔案亦逐一刪除。v詳細顯示進行的步驟 刪除檔案...