বাশ এই অতিরিক্ত আউটপুট লাইন কি?


9

এটি কোনও সময়ের জন্য যে কোনও কমান্ড চালানোর পরে এই রেখাগুলি দেখা যায় (এলোমেলোভাবে):

[1]-  Done                    wget -c http://downloads.sourceforge.net/project/zorin-os/9/zorin-os-9-core-32.iso?r=http%3A%2F%2Fzorinos.com%2Fdownload9.html
[2]+  Done                    ts=1460659842

প্রথম লাইনটি হ'ল আদেশ হ'ল এটি সর্বদা ঘটে না। তবে সময়ে সময়ে একটি কমান্ড লাইন অ্যাপটি কমান্ড লাইনে ফিরে না এসে থামায়, যতক্ষণ না আমি এন্টার টিপছি; যা এই লাইনগুলি দেখায়

আমার সিস্টেম এক সপ্তাহ আগে পর্যন্ত এ জাতীয় আচরণ করে নি। এটা কি কোন সমস্যা?

উত্তর:


20

আপনি সম্ভবত এরকম একটি আদেশ জারি করেছেন:

wget -c http://downloads.sourceforge.net/project/zorin-os/9/zorin-os-9-core-32.iso?r=http%3A%2F%2Fzorinos.com%2Fdownload9.html&ts=1460659842&something-else

এই কমান্ডটিতে একটি বিশেষ অক্ষর রয়েছে &যা একযোগে একাধিক প্রক্রিয়া চালাতে ব্যবহৃত হয় । এই আদেশটি তিনটি (বা আরও) কম্যান্ড হিসাবে ব্যাখ্যা করা হচ্ছে:

# First command (the one that you see after [1]):
wget -c http://downloads.sourceforge.net/project/zorin-os/9/zorin-os-9-core-32.iso?r=http%3A%2F%2Fzorinos.com%2Fdownload9.html
# Second command (the one that you see after [2]):
ts=1460659842
# Third command (the one which output should be above the "Done" lines):
something-else

এখানে একটি উদাহরণ যা আপনাকে আরও ভালভাবে বুঝতে সাহায্য করতে পারে:

# Here I'm launching three 'echo' commands, the first two in background, the third in foreground
andrea@andrea-laptop:~$ echo first & echo second & echo third
[1] 5033    # This is bash telling me that the first process was started with job number 1 and PID 5033
first       # This is the output from the first process
[2] 5034    # This is bash telling me that the second process was started with job number 2 and PID 5034
third       # This is the output from the third process
second      # This is the output from the second process
andrea@andrea-laptop:~$ 
[1]-  Done                    echo first    # This is bash telling me that the first background job has quit
[2]+  Done                    echo second   # This is bash telling me that the second background job has quit

এটি এবং অন্যান্য দুষ্টু প্রভাবগুলি এড়াতে আপনার URL টি সঠিকভাবে উদ্ধৃত করা উচিত:

wget -c 'http://downloads.sourceforge.net/project/zorin-os/9/zorin-os-9-core-32.iso?r=http%3A%2F%2Fzorinos.com%2Fdownload9.html&ts=1460659842&something-else'

6
তবুও অন্য কারণ যা আপনার অন্ধভাবে কখনই টার্মিনাল কমান্ড অনুলিপি করা উচিত নয় ... কেউ কেউ url করতে পারে someurl.com/index.php&malicious-command- এবং লোকেরা কেবল এটি চালায় এবং তাদের সিস্টেমটি ভেঙে দেবে।
Nzall
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.