Sharan-shara, kwandon shara don Mai Tafsirin Layin Umarni

game da shara

A talifi na gaba zamuyi duban kwandon shara. Wannan karamin fakiti na umarnin software kyauta wanda zai samar mana da kwandon shara don Mai Tafiyar Layin Umarni. A zamanin yau, duk tsarin da kuke amfani da shi, ko Gnu / Linux, ko Windows OS ko OS OS daga yanayin hoto, lokacin da kuka share fayil, yawanci yakan ƙare a Shara. Wannan yana ba mu zaɓi don tuba da dawo da fayil ɗin ko share shi dindindin. A gefe guda, idan ka goge fayil daga layin umarni, zaɓi don dawo da waɗancan fayiloli, bisa ƙa'ida ba za mu samu ba.

Kamar yadda nake fada, kwandon shara shine abokin ciniki don sarrafa kwandon shara daga layin umarni. Si ƙirƙirar laƙabi don haka lokacin da kake amfani da rm, da gaske kana amfani da kwandon shara, zaka sami hanya mai kyau don hana asarar bayanai. Da wannan zaka iya kaucewa share fayilolin da da gaske ba ka so ka share, ko dai ta hanyar sakaci ko bisa kuskure. Wannan haka ne saboda lokacin da kuka share wani abu tare da shara-cli, zai tsaya a kwandon shara.

Daga baya idan kana so ka mai da fayiloli, za a iya yi sauƙi. Menene ƙari, sharan-shara zai tuna ranar da aka share wani fayil, izininsa da kuma hanyar da ya samu kafin a share shi. Don haka zamu iya dawo dasu kamar yadda suke.

Sanya kwandon shara a Ubuntu

Shigar da shara-cli abu ne mai sauƙi a cikin Ubuntu ta amfani da mai sarrafa kunshin da ya dace. Duk abin da kuke buƙatar yi shi ne buɗe tashar (Ctrl + Alt + T) kuma gudanar da umarnin:

shigar kwandon shara tare da dacewa

sudo apt-get install trash-cli

Kayan aikin kwandon shara ya dogara da Python, don haka Hakanan zamu iya shigar da shi daga tushe. A hanya ne na kowa ga duk distros. Kuna buƙatar buɗe tashar (Ctrl + Alt + T) kuma gudanar da umarni:

zazzage repo sharan-shara

git clone https://github.com/andreafrancia/trash-cli.git

cd trash-cli

sudo python3 setup.py install

sudo python3 setup.py install --user

Misalin amfani

Da zarar an shigar, masu amfani yanzu zamu iya amfani da umarnin:

  • Sanya shara: don share fayiloli da kundayen adireshi.
  • shara-fanko: zubar da kwandon shara.
  • Jerin shara: ya lissafa fayiloli da manyan fayiloli waɗanda suke cikin kwandon shara.
  • dawo da shara- Sake dawo da fayiloli da manyan fayilolin da suke cikin kwandon shara.
  • shara-rm- Daidaiku ɗayan share takamaiman fayil ɗin da ke cikin shara.

Aika fayil zuwa kwandon shara

Yanzu zamu iya amfani da waɗannan umarnin da muke samu daga tashar ta hanya mai sauƙi. Misali, idan muna so aika wani abu zuwa kwandon shara, maimakon amfani da rm (hakan zai iya zama tabbatacce ba zai yiwu ba), zaku iya amfani da wannan umarnin:

Sanya shara

trash-put ejemplo-trash-cli.txt

Sharan-shara baya share fayiloli ko kundin adireshi a zahiri, kawai yana tura su zuwa ɓoyayyen shugabanci. HATTARA, kowane fayil ko kundin adireshi zai adana hanyar da yake a da. Wannan yana nufin cewa idan kun mayar da shi daga baya, zai zama cikin kundin adireshin da muka cire shi.

Buyayyar kundin adireshi wanda aka cire fayilolin da kundin adireshi zamu iya ganinsa tare da umarnin:

Littafin shara

ls -la $HOME/.local/share/Trash

A cikin wannan kundin adireshin zaku sami wasu kundayen adireshi guda biyu:

  • files: Anan ne umarnin da shara-shara zai kwashe fayil ko kundin adireshi.
  • info: Commandungiyar umarni tana ɗaukar fayil .trashinfo don kowane fayil ɗin da aka share / kundin adireshi.

Rubuta fayilolin da aka share ko kundayen adireshi

para jera fayiloli ko kundayen adireshi da aka samo a kwandon shara, daga layin umarni da muke aiwatarwa:

Jerin shara

trash-list

Saki kwandon shara

Kamar yadda kowa ya sani, fayiloli a cikin shara suna ɗaukar sararin diski. Saboda wannan dalili al'ada ce mai kyau daga lokaci zuwa lokaci, kyauta sararan shara. Kuma zamu iya yin wannan tare da umarnin:

trash-empty

Gudanar da shi kamar haka, ba tare da sigogi ba zai goge duk abin da muke da shi a kwandon shara.

Idan akwai so share fayiloli ko kundayen adireshi na kwanakin x, Dole ne mu wuce adadin kwanakin azaman abin siga. Misali, idan muna son share abin da aka adana a cikin kwanaki 5 da suka gabata za mu rubuta:

trash-empty 5

Dawo da fayiloli ko kundayen adireshi

Wannan umarni ne wanda zaku iya shaawar girka shara, kuma shine zai bamu damar maido da abin da aka goge. Sake dawo da shara ya maido da fayiloli ko kundayen adireshi zuwa asalin su, Ka tuna cewa shagunan da aka saka shara sun sami wannan bayanan.

dawo da shara

trash-restore

Share fayiloli daga shara

Tare da umarnin shara-rm zamu iya share fayiloli gaba ɗaya ko kundayen adireshi daga shara. Muna da hanyoyi da yawa don kammala wannan aikin. Tare da na farko zamu share fayil da suna:

trash-rm ejemplo-trash-cli.txt

Hakanan zamu iya zaɓar zuwa cire duk fayiloli tare da takamaiman tsawo:

share takamaiman fadada fayil

trash-rm '*.txt'

Idan muna so cire babban fayil daga shara, umarnin don amfani zai zama:

share babban fayil

trash-rm carpeta-ejemplo

Taimako

Ana iya samun cikakken taimako akan shafin mutum. Don tuntuɓar sa kawai zamu aiwatar da umarnin:

Sharar mutum shafi

man trash

Umurnin shara a cikin Gnu / Linux yana bamu damar share fayiloli da kundin adireshi. Hakanan zai ba mu damar dawo dasu ta hanyar adana su da cikakkiyar hanyar su, izini, kwanan wata. Ze iya tuntuɓi ƙarin game da wannan aikin daga shafi akan GitHub na shi.


Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Wanda ke da alhakin bayanan: Miguel Ángel Gatón
  2. Manufar bayanan: Sarrafa SPAM, sarrafa sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.