پارس‌کدرز چگونه کار می‌کند؟

از پارس‌کدرز بیشترین بهره را ببرید و رویای کاری خود را زندگی کنید.

پارس‌کدرز خریداران یا کارفرمایان را به مجری‌ها /فریلنسرهای خبره‌ای متصل می‌کند که برای انجام پروژه آماده هستند.

تولید سطل زباله در یونیکس با کدنویسی و اسکریپت

یک سال پیش منتشر شده

تعداد بازدید: 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روز

وضعیت مناقصه

بسته


درباره کارفرما

عضویت یک سال پیش

1 پروژه ثبت شده ،
0 پروژه در حال انجام ،
0 پروژه آماده دریافت پیشنهاد ،
نرخ پذیرش پیشنهاد 0%

برای پیدا کردن پروژه‌های مشابه ثبت نام کنید و پروفایل خود را بسازید.

ورود با گوگل
یا
نام نباید خالی باشد.
نام خانوادگی نباید خالی باشد.

نیاز به استخدام فریلنسر یا سفارش پروژه مشابه دارید؟

سفارش پروژه مشابه

قادر به انجام این پروژه هستید؟

ثبت نام کنید

مهلت ارسال پیشنهاد قیمت برای این پروژه تمام شده است

سری به پروژه‌های مشابه بزنید

روش کار در پارس‌کدرز

به رایگان یک حساب کاربری بسازید

مهارت‌ها و تخصص‌های خود را ثبت کنید، رزومه و نمونه‌کارهای خود را نشان دهید و سوابق کاری خود را شرح دهید.

به شیوه‌ای که دوست دارید کار کنید

برای پروژه‌های دلخواه در زمان دلخواه پیشنهاد قیمت خود را ثبت کنید و به فرصت‌های شغلی منحصر به فرد دسترسی پیدا کنید.

با اطمینان دستمزد دریافت کنید

از زمان شروع کار تا انتهای کار به امنیت مالی شما کمک خواهیم کرد. وجه پروژه را از ابتدای کار به امانت در سایت نگه خواهیم داشت تا تضمین شودکه بعد از تحویل کار دستمزد شما پرداخت خواهد شد.

می‌خواهید شروع به کار کنید؟

یک حساب کاربری بسازید


بهترین مشاغل فریلنسری را پیدا کنید
رشد شغلی شما به راحتی ایجاد یک حساب کاربری رایگان و یافتن کار (پروژه) متناسب با مهارت‌های شما است.

پیدا کردن کار (پروژه)

تماشای دمو روش کار