|
|||
|
أخوتي الأعزاء .. أتمنى من الله ثم منكم المساعدة العاجلة في جزئية من الحل .. مع العلم أنني حاولت ولكن لم أستطع أن أنجح في حل هذه المشكلة على الرغم من إنتهائي من جميع الأوامر السابقة. المشكلة في عمل الريستور. سوف أقوم بكتابة السؤال ووضع الحلول كاملة .. وأتمنى منكم المساعدة في حل الريستور على وجه الخصوص وكذلك إبداء الملاحظات على بقية الحلول في حالة وجود أي خطأز مع العلم أنني قمت بتنفيذ جميع الأوامر وقد نجحت بإستثناء الريستور. السؤال : BackUp system coursework You are employed by the MUU Expert Software Systems Company as a Unix specialist. You are point to provide a simple set of scripts for a customer who requires a system to enable the backing up of files and Directories. The scripts should be (these names should be used - you will lose marks if other names are used!) ·initialise – initialises the Directory for the BackUp (called BackUp and be in your home Directory) and any associated files, and should be run once before using the other scripts
For example, typing restore without a file/Directory name list the content: mc09xx:0:/home/msc10xx/msccw/results mc09xx:1:/home/msc10xx/msccw/delly mc09xx:2:/home/msc10xx/msccw/tmp You can then type restore 1 to restore the file delly. Note if you BackUp two files with the same name, they should both be saved and you should be able to restore either or both of them.
initialise just sets up any Directories, files etc that the system needs and should be run once before using the other scripts. You may assume that the user has a bin Directory which is on their PATH You should make the scripts as robust as possible since they will be used by ex-Windows users. They should be Designed to operate from a Directory on the users path (e.g. $HOME/bin) الحلول : # Script copies all files under the given path $1 # also it writes down the original path for all the backed up files so that it can be restored later. # the file EXT.DAT contains the original path & file's number. # check if the prv. step done or not: if [ $? = 0 ] then # remove the previous data file that contains the original paths for prev. files. # this step is important since this script should create a new file whenever it has been run. rm ~/BackUp/EXT.DAT echo Copying all files in $1 # initi. counter c=1 echo [$c]$1$f >> ~/BackUp/EXT.DAT # write the file's original path to EXT.DAT file with a sequnce number
c=$(($c + 1)) # increment the counter . done echo `ls -l $1 -- grep ^- -- wc -l` files have been copied to ~/BackUp sccUSSFully. # give info for user about the process . ======================== # check if the user gave a parameter or not: if [ $# = 0 ] then echo Error, you have to give one parameter, either file/Directory to delete . echo E.g.: ./delete.sh ~/Desktop/testfoler else # check if the file/directroy exsits or not if [ -d $1 ] ---- [ -f $1 ] then echo Do you really want to delete $1 [Y or N ]? read answer if [ $answer = "y " ] then mv $HOME/BackUp/ #rm -rf $1 echo $1 has neen deleted . else echo Nothing done . fi # end inner if else echo $1 does not exsits fi # end outter if fi ===================== # This script empty the trash can, where the trash path is "~/.local/share/Trash/files/*" (Ubuntu 9.10) # Also, the Trash a Hidden folder because there is a dot before the name of the folder. }'` ]? read answer if [ $answer = "Y " ] then # start deleteing : rm -rf $HOME/BackUp /* echo $n files/Directorys have been deleted from Trash . else echo Nothing done . fi # end if ================= #check if there is parameters or not if [ $# = 0 ] then echo List of all files in BackUp system : # cat ~/BackUp/EXT.DAT cd ~/BackUp echo [$c]$f c=$(($c + 1)) # increment the counter . done elif [ `sed -n "/^\[$1\]/s/.*]//p" ~/BackUp/EXT.DAT` = 0 ] ) # Take the name of the file and store it into variable f: f=$( echo $p -- awk 'BEGIN { FS = "\/"} ;{ print $NF }' ) # copy ff to the original path p: cp $ff $p echo File $f restored sucCSSfully to its original location $p else mv $1 ~/$1 fi ================== المشكلة في السكربت الأخير لا يعمل. تظهر نافذة تفيد بوجود خطأ في السطور الأخيرة. أتمنى من الله ثم منكم المساعدة في تعديل الحل. حيث أن العمل لابد أن يتم تسليمه يوم الإثنين القادم إن شاء الله وأنا في مشكلة مع النقطة الأخيرة. مع الشكر لكم جميعا |
| المواضيع المتشابهه | ||||
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| مشكلة فى عمل برنامج بالفيجوال بيسك(كود واحد يوجد به مشكلة)ارجووا المساعدة | love whisper007 | البرمجة القياسية Ajax - XML - CSS - JavaScript -php وغيرهم | 2 | 02-04-2009 06:39 PM |
| مشكلة : أواجه مشكلة فى الويندوز الخاص بى Black Heart | kingo_2003 | المنتدى العام لتصميم الأسطوانة | 2 | 02-03-2008 06:46 PM |
| بصورة حل مشكلة صادف iexplore.exe مشكلة ويجب إغلاقه. المعذرة على الإزعاج ][ ثبت ][ | احمد ابوزيد | صيانة الكمبيوتر وحلول الحاسب الألي - هاردوير | 6 | 19-12-2007 01:12 PM |
| مشكلة والله مشكلة mp4 لا أعرف كيف أدخل إليها الفيديوات | saidsoft.zmaim | برامج الفيديو, خلفيات فيديو, برامج الصوتيات | 3 | 08-12-2007 09:00 PM |
| مشكلة في تسجيل الدخول بماسينجر الهوتميل + مشكلة بالدخول للبريد | مخلب النمر | صيانة الكمبيوتر وحلول الحاسب الألي - هاردوير | 1 | 16-01-2005 11:25 PM |
|
||||
|
وعليكم السلام
وايضا هناك تطبيق خاص يتيح لك عمل BackUp و restore . اما اذا اردتها لغرض التطوير فتواصل معي لكي نطور ال code خاصتك وشكرا من مواضيعي:
- A4 لانشاء عروض تقديمية مبدعة - network problems DOJO ! - يوم المطورون ل ubuntu بالهند - انتبه للخصوصية مع تطبيق cree.py - حمل ملفات torrent بحماية مع anomos - الاوامر المهمة لضبط وتشخيص الاتصال على جميع انظمة التشغيل - SkyDownloader pro - معاينة الصفحة من google - طريقة لجعل firefox ذا سرعة على ubuntu - لنركب آلة الزمن ونشاهد بوابة داماس في الماضي - حماية السرفر - الجدار الناري - اذكر صفاتك السيئة - أسئلة في الاسلام . واريد الاجابة - الطريقة المطورة لكتابة المواضيع - اقتراح - - حماية السرفر -mod_secutrity |
| أدوات الموضوع | |