از پارسکدرز بیشترین بهره را ببرید و رویای کاری خود را زندگی کنید.
یک سال پیش منتشر شده
تعداد بازدید: 145
کد پروژه: 369707
شرح پروژه
سلام وقت بخیر
من یه پروژه ایی دارم میخوام داخل محیط لینوکس با استفاده از اسکریپت نویسی بدون استفاده از تابع برام یه سطل زباله تولید کنه و محتویات رو از یک شاخه دیگر به داخل دایرکتوری home که سطل زباله داخلش هست برده و پاک کنه.
از طریق هارد لینک و inode هم اطلاعات را نگهداری کنه
Write a script called recycle that mimics the rm command. The recycle script should be able to accept the name of a file as a command line argument as rm does, but instead of deleting the file, your script should move it to a recyclebin directory called recyclebin located in your home directory.
The script name is recycle and will be stored in $HOME/project.
The recycle bin will be $HOME/recyclebin. Ensure that your script creates this directory.
The file to be deleted will be a command line argument and the script should be executed as follows: bash recycle fileName
The script must test for the following error conditions. When any of the following are encountered, the script must display the same kind of error messages as the rm command, and the script must set a non-zero exit status to terminate.
No filename provided
File does not exist
Directory name provided instead of a filename
Filename provided is recycle. In this case, display the error message “Attempting to delete recycle – operation aborted” and terminate the script with a non-zero exit status. Do not generate this error if the filename is only similar to recycle. For example, a file called recycle2015 should not generate any error messages. Be sure to create a hard link for your script before testing this error.
The filenames in the recyclebin, will be in the following format:
fileName_inode
For example, if a file named f1 with inode 1234 is recycled, the file in the recyclebin will be named f1_1234. This gets around the potential problem of deleting two files with the same name. The recyclebin will only contain files, not directories.
Create a hidden file called .restore.info in $HOME. Each line of this file will contain the name of the file in the recyclebin, followed by a colon, followed by the original absolute path of the file. For example, if a file called f1, with an inode of 1234 was recycled from the /home/trainee1 directory, .restore.info will contain:
f1_1234:/home/trainee1/f1
If another file named f1, with an inode of 5432, was recycled from the /home/trainee1/testing directory, then .restore.info will contain:
f1_1234:/home/trainee1/f1
f1_5432:/home/trainee1/testing/f1
مهارت ها و تخصص های مورد نیاز
بودجه
300,000 تومان تا 750,000 تومان
مهلت برای انجام
2روز
وضعیت مناقصه
بسته
درباره کارفرما
عضویت یک سال پیش
قادر به انجام این پروژه هستید؟
مهلت ارسال پیشنهاد قیمت برای این پروژه تمام شده است
به رایگان یک حساب کاربری بسازید
مهارتها و تخصصهای خود را ثبت کنید، رزومه و نمونهکارهای خود را نشان دهید و سوابق کاری خود را شرح دهید.
به شیوهای که دوست دارید کار کنید
برای پروژههای دلخواه در زمان دلخواه پیشنهاد قیمت خود را ثبت کنید و به فرصتهای شغلی منحصر به فرد دسترسی پیدا کنید.
با اطمینان دستمزد دریافت کنید
از زمان شروع کار تا انتهای کار به امنیت مالی شما کمک خواهیم کرد. وجه پروژه را از ابتدای کار به امانت در سایت نگه خواهیم داشت تا تضمین شودکه بعد از تحویل کار دستمزد شما پرداخت خواهد شد.
میخواهید شروع به کار کنید؟
یک حساب کاربری بسازید
بهترین مشاغل فریلنسری را پیدا کنید
رشد شغلی شما به راحتی ایجاد یک حساب کاربری رایگان و یافتن کار (پروژه) متناسب با مهارتهای شما
است.
پیدا کردن کار (پروژه)
تماشای دمو روش کار