Yadda ake motsawa ko kwafe fayiloli ko manyan fayiloli a cikin Linux?

Linux

Yawancinmu idan ba mafi girma bae mun saba amfani da zane mai zane ko yanayin muhallin yin magana. Ayyukan motsawa, gyarawa, sake suna tsakanin sauran abubuwa fayiloli ko manyan fayiloli yawanci ana yin su ta hanya mai sauƙi tare da danna kaɗaita kawai.

Pero abin da ke faruwa lokacin da dole kuyi amfani da waɗannan ƙungiyoyi akan sabar tunda galibinsu galibi ana sarrafa su ne kawai daga na'ura mai ba da umarni, wannan galibi ana shagaltar dasu cikin sabobin sadaukarwa, kodayake bazai taba yin zafi ba sanin yadda ake yin hakan don baku taba sanin lokacin da zai iya yin aiki ba.

Ya faru da ni cewa a wasu lokuta na rasa mahalli na zane kuma dole ne in yi amfani da na'ura mai kwakwalwa don dawo da shi, amma wannan wata ma'ana ce.

Ranar a yau nazo ne dan na baku wasu umarni masu sauki wadanda zasu taimaka mana don aiwatar da ayyukan kwafe ko motsi fayiloli.

Labari mai dangantaka:
Izini na asali a cikin GNU / Linux tare da chmod

Yaya ake motsa fayiloli ko manyan fayiloli a cikin Linux?

Abu na farko shine zai zama yana da m wanda zai zama kayan aikinmu wanda zai taimaka mana duk wannan, abu na biyu shine ƙirƙirar wasu manyan fayiloli tare da takaddun rubutu a ciki wannan don kar a lalata ko rasa bayanai.

kwafa da matsar da fayiloli

Abu mafi mahimmanci shine matsar da fayil ɗin fayil saboda wannan zamuyi amfani da umarnin mv:

mv archivo.txt /home/usuario/Documentos/prueba

Anan abin da muke yi yana motsa file.txt zuwa jakar gwajin da ke cikin jakar takardunmu. Saboda wannan muke la'akari da cewa a halin yanzu muna matsayi a cikin kundin adireshi inda file.txt yake

Lokacin da muke son matsar da fayil sama da ɗaya a lokaci guda, nau'in haruffa zai kasance kamar haka:

mv archivo.1 archivo.2 archivo.3 /ruta/de/destino

Yanzu wani abu mai amfani shine amfani da * lokacin da fayiloli suna da tushe iri ɗaya a suna, misali:

Amd-gpu…

Amd-gpu-pro ..

Amd-direba ...

Labari mai dangantaka:
Tukwici: Sama da umarni 400 don GNU / Linux waɗanda ya kamata ku sani 😀

Don haka, kamar yadda zamu iya gani, suna da tushe iri ɗaya "AMD" don matsar da duk fayilolin da suke tare da waccan majalissar, muna yin masu zuwa:

mv AMD* /ruta/de/destino

Hakanan ya shafi duk waɗancan fayilolin da nau'in iri ɗaya, misali, .doc, .xls, .deb, .rpm da dai sauransu. Don motsa su muna amfani kawai

mv *.deb /ruta/de/destino

Har zuwa wannan lokacin a bayyane yake yadda yake aiki da yadda zamu iya sauƙaƙe aikin ta hanyoyi daban-daban, amma menene ya faru yayin da muke son matsar da duk abin da yake da kundin adireshi, fayiloli da ƙananan fayiloli.

Saboda wannan zamuyi amfani da *, misali, Ina so in matsar da duk abin da na ɓata daga kalma zuwa kalmomin adireshi guda biyu da suka gabata:

mv wordpress/* …/

Don ƙarin sani game da umarnin, zamu iya amfani da mutumin ta ko tare da -help siga, a nan za mu ga duk matakan sa.

Yadda za a kwafa fayiloli a cikin Linux?

Don wannan harka kusan kamanceceniya da wancan, don matsar da fayiloli ko manyan fayiloli daga wannan zuwa wani, nan adana fayiloli da manyan fayiloli a asalinsu kuma ƙirƙirar kwafi a cikin kundin adireshi da aka zaɓa.

Un umarni mai sauƙi don kwafe fayil ko babban fayil daga wannan adireshin zuwa wani:

cp objetoacopiar rutadedestino

Hanya mafi bayyane ta dubanta:

cp archivo.txt /ruta/de/destino

Wannan umarni galibi ana amfani dashi da yawa don yin madadin fayil ko babban fayil wanda za'a shirya shi, tunda yana ƙirƙirar cikakken kwafi, amma tare da suna daban, misali mai amfani:

cp log.txt log.bak

para kwafa fayiloli da yawa ko manyan fayiloli:

cp archivo1 /carpeta1 /carpeta/carpeta /ruta/de/destino

Yanzu idan muna so mu kwafa duk abin da ya ƙunshi babban fayil ɗin da aka sanya mu zuwa wani kundin adireshi:

cp  /* /ruta/de/destino

Yanzu idan muna son kwafin kundin adireshi daga wannan wuri zuwa wancan

cp /directorio /ruta/de/destino

Yana da mahimmanci mu zama matakin ɗaya ƙasa da kundin adireshin da za mu kwafa, domin idan muna cikin sa ya zama dole a tantance cikakken hanyar, tunda idan kawai za mu sanya umarnin a yadda na sa shi, zai haifar da kawai kundin adireshi.

Aƙarshe, idan muna so mu san duk abubuwan da yake da su, mun dogara ga mutuminsa ko tare da-taimako

Ba tare da ɓata lokaci ba, umarni ne masu mahimmanci, amfani da su na iya taimaka muku da yawa kuma ya kamata ku ma yi hankali da su tunda koyaushe ana ba da shawarar yin amfani da fom ɗin maimaitawa, wanda ake amfani da shi tare da -r siga


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

2 comments, bar naka

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da 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.

  1.   Jorge C Rodriguez S. m

    Idan ina so in kwafa duk fayilolin daga wannan fayil ɗin zuwa wani to zai zama kenan

    cp / * / suna / babban fayil / makoma ??

    yana tsaye a cikin folda inda nake da fayiloli don kwafa?

  2.   Juan Manuel Carrillo Campos m

    Ina so in kwafa takamaiman adadin bayanai daga tushen-fayil zuwa fayil din da za a je, wani lokacin ma rikodin ne daga rikodin-zuwa zangon, ta yaya zan iya yin hakan?