В разрешении Bash отказано. Объяснение и решение.

| | | | | | | |

–§–∞–π–ª—ã –≤ –æ–ø–µ—Ä–∞—Ü–∏–æ–Ω–Ω–æ–π —Å–∏—Å—Ç–µ–º–µ –æ–±—ã—á–Ω–æ –∏–º–µ—é—Ç —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è, —á—Ç–æ –¥–µ–ª–∞–µ—Ç –∏—Ö –¥–æ—Å—Ç—É–ø–Ω—ã–º–∏ –¥–ª—è –æ–≥—Ä–∞–Ω–∏—á–µ–Ω–Ω–æ–≥–æ –∫—Ä—É–≥–∞ –ª—é–¥–µ–π. –ù–∞–ø—Ä–∏–º–µ—Ä, –Ω–µ–∫–æ—Ç–æ—Ä—ã–µ —Ñ–∞–π–ª—ã –Ω–∞ –∫–æ–º–ø—å—é—Ç–µ—Ä–µ –¥–æ—Å—Ç—É–ø–Ω—ã —Ç–æ–ª—å–∫–æ –∞–¥–º–∏–Ω–∏—Å—Ç—Ä–∞—Ç–æ—Ä–∞–º; –¥—Ä—É–≥–∏–µ —Ñ–∞–π–ª—ã –¥–æ—Å—Ç—É–ø–Ω—ã —Ç–æ–ª—å–∫–æ –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω–æ–º—É –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—é.

–ï—Å–ª–∏ –≤—ã –ø–æ–ø—ã—Ç–∞–µ—Ç–µ—Å—å –∑–∞–ø—É—Å—Ç–∏—Ç—å —Ñ–∞–π–ª, –∫ –∫–æ—Ç–æ—Ä–æ–º—É —É –≤–∞—Å –Ω–µ—Ç –¥–æ—Å—Ç—É–ø–∞ –Ω–∞ –∫–æ–º–ø—å—é—Ç–µ—Ä–µ Linux, –≤—ã —É–≤–∏–¥–∏—Ç–µ –æ—Ç–∫–∞–∑–∞–Ω–æ –≤ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–∏ –æ—à–∏–±–∫–∞. –í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –º—ã –ø–æ–≥–æ–≤–æ—Ä–∏–º –æ –ø—Ä–∏—á–∏–Ω–µ —ç—Ç–æ–π –æ—à–∏–±–∫–∏ –∏ –æ —Ç–æ–º, –∫–∞–∫ –µ–µ —Ä–µ—à–∏—Ç—å. –î–∞–≤–∞–π—Ç–µ –Ω–∞—á–Ω–µ–º.

–í —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–∏ Bash –æ—Ç–∫–∞–∑–∞–Ω–æ

–û—à–∏–±–∫–∞ Bash –†–∞–∑—Ä–µ—à–µ–Ω–∏–µ –æ—Ç–∫–ª–æ–Ω–µ–Ω–æ –≤–æ–∑–Ω–∏–∫–∞–µ—Ç, –∫–æ–≥–¥–∞ –≤—ã –ø—ã—Ç–∞–µ—Ç–µ—Å—å –∑–∞–ø—É—Å—Ç–∏—Ç—å —Ñ–∞–π–ª, –¥–ª—è –∫–æ—Ç–æ—Ä–æ–≥–æ —É –≤–∞—Å –Ω–µ—Ç —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è . –≠—Ç–æ –º–æ–∂–µ—Ç –ø—Ä–æ–∏–∑–æ–π—Ç–∏, –µ—Å–ª–∏ —Ñ–∞–π–ª –º–æ–∂–µ—Ç –±—ã—Ç—å –≤—ã–ø–æ–ª–Ω–µ–Ω —Ç–æ–ª—å–∫–æ –∫–æ–Ω–∫—Ä–µ—Ç–Ω—ã–º –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª–µ–º –∏–ª–∏ –≥—Ä—É–ø–ø–æ–π, —á–ª–µ–Ω–æ–º –∫–æ—Ç–æ—Ä–æ–π –≤—ã –Ω–µ —è–≤–ª—è–µ—Ç–µ—Å—å.

–•–æ—Ç–∏—Ç–µ —É–∑–Ω–∞—Ç—å –±–æ–ª—å—à–µ –æ —Ç–æ–º, –∫–∞–∫ —É—á–µ–±–Ω—ã–π –∫—É—Ä—Å –ø–æ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏—é –º–æ–∂–µ—Ç –ø–æ–º–æ—á—å –≤–∞–º –≤ –æ–±—É—á–µ–Ω–∏–∏ –∫–æ–¥–∏—Ä–æ–≤–∞—Ç—å? –≤–º–µ—Å—Ç–µ —Å –ø–æ–ª—É—á–µ–Ω–∏–µ–º –¥–æ–ø–æ–ª–Ω–∏—Ç–µ–ª—å–Ω–æ–π –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏–∏ –æ —Å—Ç–æ–∏–º–æ—Å—Ç–∏ –∏ –æ—Ç–∑—ã–≤–∞—Ö –æ –±—É—Ç–∫–µ–º–ø–µ.


–í –æ–ø–µ—Ä–∞—Ü–∏–æ–Ω–Ω–æ–π —Å–∏—Å—Ç–µ–º–µ Linux —Å—É—â–µ—Å—Ç–≤—É–µ—Ç —Ç—Ä–∏ —Ç–∏–ø–∞ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–π:

  • –ß—Ç–µ–Ω–∏–µ
  • –ó–∞–ø–∏—Å—å
  • –í—ã–ø–æ–ª–Ω–µ–Ω–∏–µ

–£ –≤–∞—Å –º–æ–∂–µ—Ç –±—ã—Ç—å —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–µ –Ω–∞ —á—Ç–µ–Ω–∏–µ –∏ –∑–∞–ø–∏—Å—å –≤ —Ñ–∞–π–ª –±–µ–∑ –ø—Ä–∏–≤–∏–ª–µ–≥–∏–π –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è. –¢–∞–∫–∏–º –æ–±—Ä–∞–∑–æ–º, –µ—Å–ª–∏ –≤—ã —Å—Ç–æ–ª–∫–Ω—É–ª–∏—Å—å —Å –æ—Ç–∫–∞–∑–æ–º –≤ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–∏ Bash, –æ–±—è–∑–∞—Ç–µ–ª—å–Ω–æ –ø—Ä–æ–≤–µ—Ä—å—Ç–µ, —Ä–∞–∑—Ä–µ—à–µ–Ω–æ –ª–∏ –≤–∞–º –∑–∞–ø—É—Å–∫–∞—Ç—å —Ñ–∞–π–ª. –í—ã –º–æ–∂–µ—Ç–µ –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, –µ—Å—Ç—å –ª–∏ —É –≤–∞—Å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â—É—é –∫–æ–º–∞–Ω–¥—É:

ls -la

–≠—Ç–∞ –∫–æ–º–∞–Ω–¥–∞ –≤—ã–¥–∞—Å—Ç –≤–∞–º –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏—è –æ –ø—Ä–∞–≤–∞—Ö –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª–∞–º. –ú—ã –æ–±—Å—É–¥–∏–º –≤—ã–≤–æ–¥ —ç—Ç–æ–π –∫–æ–º–∞–Ω–¥—ã –≤ —Ä–∞–∑–¥–µ–ª–µ –†–µ—à–µ–Ω–∏–µ –¥–∞–ª–µ–µ –≤ —Å—Ç–∞—Ç—å–µ. –î–∞–≤–∞–π—Ç–µ —Ä–∞—Å—Å–º–æ—Ç—Ä–∏–º –ø—Ä–∏–º–µ—Ä —Å—Ü–µ–Ω–∞—Ä–∏—è —Å –æ—à–∏–±–∫–æ–π –¥–æ—Å—Ç—É–ø –∑–∞–ø—Ä–µ—â–µ–Ω –∏ —Å–æ–æ—Ç–≤–µ—Ç—Å—Ç–≤—É—é—â–µ–µ —Ä–µ—à–µ–Ω–∏–µ.

–ü—Ä–∏–º–µ—Ä —Å—Ü–µ–Ω–∞—Ä–∏—è

–£ –Ω–∞—Å –µ—Å—Ç—å —Ñ–∞–π–ª —Å –∏–º–µ–Ω–µ–º example. —à. –ú—ã –º–æ–∂–µ–º —É–≤–∏–¥–µ—Ç—å —ç—Ç–æ—Ç —Ñ–∞–π–ª, –≤—ã–ø–æ–ª–Ω–∏–≤ –∫–æ–º–∞–Ω–¥—É ls. –ö–æ–º–∞–Ω–¥–∞ ls –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç —Å–ª–µ–¥—É—é—â–µ–µ:

81% —É—á–∞—Å—Ç–Ω–∏–∫–æ–≤ –∑–∞—è–≤–∏–ª–∏, —á—Ç–æ –æ–Ω–∏ –ø–æ—á—É–≤—Å—Ç–≤–æ–≤–∞–ª–∏ —Å–µ–±—è –±–æ–ª–µ–µ —É–≤–µ—Ä–µ–Ω–Ω—ã–º–∏ –≤ —Å–≤–æ–∏—Ö –ø–µ—Ä—Å–ø–µ–∫—Ç–∏–≤–∞—Ö —Ç—Ä—É–¥–æ—É—Å—Ç—Ä–æ–π—Å—Ç–≤–∞ –≤ —Å—Ñ–µ—Ä–µ –≤—ã—Å–æ–∫–∏—Ö —Ç–µ—Ö–Ω–æ–ª–æ–≥–∏–π –ø–æ—Å–ª–µ –ø–æ—Å–µ—â–µ–Ω–∏—è —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è. –ù–∞–π–¥–∏—Ç–µ –ø–æ–¥—Ö–æ–¥ –∫ —É—á–µ–±–Ω–æ–º—É –ª–∞–≥–µ—Ä—é —Å–µ–≥–æ–¥–Ω—è.

–°—Ä–µ–¥–Ω–∏–π –≤—ã–ø—É—Å–∫–Ω–∏–∫ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –ø–æ—Ç—Ä–∞—Ç–∏–ª –º–µ–Ω–µ–µ —à–µ—Å—Ç–∏ –º–µ—Å—è—Ü–µ–≤ –Ω–∞ –ø–µ—Ä–µ—Ö–æ–¥–Ω—É—é –∫–∞—Ä—å–µ—Ä—É, –æ—Ç –Ω–∞—á–∞–ª–∞ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –¥–æ –ø–æ–∏—Å–∫–∞ —Å–≤–æ–µ–π –ø–µ—Ä–≤–æ–π —Ä–∞–±–æ—Ç—ã.

–ú—ã —Ö–æ—Ç–∏–º –∑–∞–ø—É—Å—Ç–∏—Ç—å –Ω–∞—à –ø—Ä–∏–º–µ—Ä. .sh —Ñ–∞–π–ª. –î–ª—è —ç—Ç–æ–≥–æ –º—ã –º–æ–∂–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –Ω–æ—Ç–∞—Ü–∏—é ./:

–≠—Ç–∞ –∫–æ–º–∞–Ω–¥–∞ –ø–æ–∑–≤–æ–ª—è–µ—Ç –Ω–∞–º –∑–∞–ø—É—Å—Ç–∏—Ç—å —Ñ–∞–π–ª example.sh, –∫–æ—Ç–æ—Ä—ã–π –Ω–∞—Ö–æ–¥–∏—Ç—Å—è –≤ –Ω–∞—à–µ–º –∫–∞—Ç–∞–ª–æ–≥–µ ./ (–∫–∞—Ç–∞–ª–æ–≥, –∫–æ—Ç–æ—Ä—ã–π –º—ã —Å–µ–π—á–∞—Å –ø—Ä–æ—Å–º–∞—Ç—Ä–∏–≤–∞–µ–º). –î–∞–≤–∞–π—Ç–µ –ø–æ—Å–º–æ—Ç—Ä–∏–º, —á—Ç–æ –ø—Ä–æ–∏–∑–æ–π–¥–µ—Ç, –∫–æ–≥–¥–∞ –º—ã –ø–æ–ø—ã—Ç–∞–µ–º—Å—è –∑–∞–ø—É—Å—Ç–∏—Ç—å —Ñ–∞–π–ª:

–ù–∞—à–∞ –∫–æ–º–∞–Ω–¥–∞ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –æ—à–∏–±–∫—É.

< / div>

–†–µ—à–µ–Ω–∏–µ

–ù–∞—à–∞ –æ–±–æ–ª–æ—á–∫–∞ Bash —Å–æ–æ–±—â–∞–µ—Ç –Ω–∞–º, —á—Ç–æ —É –Ω–∞—Å –Ω–µ—Ç —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–π –Ω–∞ –∑–∞–ø—É—Å–∫ –Ω–∞—à–µ–≥–æ —Ñ–∞–π–ª–∞. –ú—ã –º–æ–∂–µ–º –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, –∫–∞–∫–∏–µ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è —É –Ω–∞—Å –µ—Å—Ç—å, –∑–∞–ø—É—Å—Ç–∏–≤ –∫–æ–º–∞–Ω–¥—É ls -la:

–£ –Ω–∞—Å –Ω–µ—Ç –ø—Ä–∞–≤ –Ω–∞ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ –Ω–∏ –æ–¥–Ω–æ–≥–æ –∏–∑ –Ω–∞—à–∏—Ö —Ñ–∞–π–ª–æ–≤. –ï—Å–ª–∏ –±—ã –±—ã–ª x –ø–æ—Å–ª–µ rw –≤ –ø–µ—Ä–≤–æ–π –∑–∞–ø–∏—Å–∏ –≤—ã–≤–æ–¥–∞ –≤—ã—à–µ, –º—ã –±—ã –∑–Ω–∞–ª–∏, —á—Ç–æ –º–æ–∂–µ–º –≤—ã–ø–æ–ª–Ω–∏—Ç—å –Ω–∞—à —Ñ–∞–π–ª. –¢—Ä–∏ —Å–∏–º–≤–æ–ª–∞ –ø–æ—Å–ª–µ –ø–µ—Ä–≤–æ–≥–æ –ø—Ä–µ–¥—Å—Ç–∞–≤–ª—è—é—Ç –ø—Ä–∞–≤–∞ —á—Ç–µ–Ω–∏—è, –∑–∞–ø–∏—Å–∏ –∏ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è –¥–ª—è –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å. –ù–∞—à–∞ –≥—Ä—É–ø–ø–∞ —Ç–∞–∫–∂–µ –Ω–µ –∏–º–µ–µ—Ç –ø—Ä–∞–≤ –Ω–∞ –∑–∞–ø–∏—Å—å –∏–ª–∏ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ.

–ß—Ç–æ–±—ã —Ä–µ—à–∏—Ç—å —ç—Ç—É –ø—Ä–æ–±–ª–µ–º—É, –Ω–∞–º –Ω—É–∂–Ω–æ –ø—Ä–µ–¥–æ—Å—Ç–∞–≤–∏—Ç—å —Å–µ–±–µ –ø—Ä–∞–≤–∞ –Ω–∞ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ:

–≠—Ç–∞ –∫–æ–º–∞–Ω–¥–∞ –¥–∞–µ—Ç –Ω–∞—à–µ–º—É –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—é –ø—Ä–∞–≤–∞ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è (" x ") –Ω–∞–¥ —Ñ–∞–π–ª–æ–º example.sh.

–ú—ã –º–æ–∂–µ–º –í—ã–ø–æ–ª–Ω—è–π—Ç–µ —ç—Ç—É –∫–æ–º–∞–Ω–¥—É —Ç–æ–ª—å–∫–æ –≤ —Ç–æ–º —Å–ª—É—á–∞–µ, –µ—Å–ª–∏ –Ω–∞–º —Ä–∞–∑—Ä–µ—à–µ–Ω–æ –∏–∑–º–µ–Ω—è—Ç—å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É. –ï—Å–ª–∏ –±—ã —ç—Ç–æ—Ç —Ñ–∞–π–ª –±—ã–ª –∑–∞—â–∏—â–µ–Ω (–Ω–∞–ø—Ä–∏–º–µ—Ä, –ø—Ä–∏–Ω–∞–¥–ª–µ–∂–∞–ª –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—é root), –º—ã –Ω–µ —Å–º–æ–≥–ª–∏ –±—ã –∏–∑–º–µ–Ω–∏—Ç—å —ç—Ç–æ—Ç —Ñ–∞–π–ª.

–§–∞–π–ª –ø—Ä–∏–Ω–∞–¥–ª–µ–∂–∏—Ç —Å–∏—Å—Ç–µ–º–µ james –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å, —á—Ç–æ–±—ã —è –º–æ–≥ –∏–∑–º–µ–Ω–∏—Ç—å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª–∞–º –≤ –º–æ–µ–π —É—á–µ—Ç–Ω–æ–π –∑–∞–ø–∏—Å–∏ james. –Ø —Ç–∞–∫–∂–µ –º–æ–≥ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å sudo –¥–ª—è –∏–∑–º–µ–Ω–µ–Ω–∏—è –ø—Ä–∞–≤ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª–∞–º, —Ö–æ—Ç—è –≤ —ç—Ç–æ–º –Ω–µ—Ç –Ω–µ–æ–±—Ö–æ–¥–∏–º–æ—Å—Ç–∏, –ø–æ—Ç–æ–º—É —á—Ç–æ —É –º–æ–µ–π —É—á–µ—Ç–Ω–æ–π –∑–∞–ø–∏—Å–∏ –µ—Å—Ç—å –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã–π –¥–æ—Å—Ç—É–ø.

–ó–∞–∫–ª—é—á–µ–Ω–∏–µ

The Bash < –ö–æ–¥> –æ—Ç–∫–∞–∑–∞–Ω–æ –≤ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–∏ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ –≤—ã –ø—ã—Ç–∞–µ—Ç–µ—Å—å –≤—ã–ø–æ–ª–Ω–∏—Ç—å —Ñ–∞–π–ª, –¥–ª—è –∫–æ—Ç–æ—Ä–æ–≥–æ —É –≤–∞—Å –Ω–µ—Ç —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è. –ß—Ç–æ–±—ã —Ä–µ—à–∏—Ç—å —ç—Ç—É –ø—Ä–æ–±–ª–µ–º—É, –∏—Å–ø–æ–ª—å–∑—É–π—Ç–µ –∫–æ–º–∞–Ω–¥—É chmod u + x, —á—Ç–æ–±—ã –ø—Ä–µ–¥–æ—Å—Ç–∞–≤–∏—Ç—å —Å–µ–±–µ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è. –ï—Å–ª–∏ –≤—ã –Ω–µ –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —ç—Ç—É –∫–æ–º–∞–Ω–¥—É, –≤–∞–º –º–æ–∂–µ—Ç –ø–æ—Ç—Ä–µ–±–æ–≤–∞—Ç—å—Å—è –æ–±—Ä–∞—Ç–∏—Ç—å—Å—è –∫ —Å–∏—Å—Ç–µ–º–Ω–æ–º—É –∞–¥–º–∏–Ω–∏—Å—Ç—Ä–∞—Ç–æ—Ä—É, —á—Ç–æ–±—ã –ø–æ–ª—É—á–∏—Ç—å –¥–æ—Å—Ç—É–ø –∫ —Ñ–∞–π–ª—É.

–•–æ—Ç–∏—Ç–µ —É–∑–Ω–∞—Ç—å –±–æ–ª—å—à–µ –æ Bash? –û–∑–Ω–∞–∫–æ–º—å—Ç–µ—Å—å —Å –Ω–∞—à–∏–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ–º –ø–æ —Ä–∞–±–æ—Ç–µ —Å –∫–æ–º–∞–Ω–¥–Ω–æ–π —Å—Ç—Ä–æ–∫–æ–π . –≠—Ç–æ —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ —Å–æ–¥–µ—Ä–∂–∏—Ç –æ—Å–Ω–æ–≤–Ω—ã–µ —Å–æ–≤–µ—Ç—ã –ø–æ –∏–∑—É—á–µ–Ω–∏—é Bash. –í—ã —Ç–∞–∫–∂–µ –Ω–∞–π–¥–µ—Ç–µ —Å–ø–∏—Å–æ–∫ —Ä–µ—Å—É—Ä—Å–æ–≤, –∫–æ—Ç–æ—Ä—ã–µ –ø–æ–º–æ–≥—É—Ç –≤–∞–º —É—Å–∫–æ—Ä–∏—Ç—å –ø—Ä–æ—Ü–µ—Å—Å –æ–±—É—á–µ–Ω–∏—è.