Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳
Действительно, что означают цифры которые мы получили в прошлом посте?
Это кодировка, заключающая в себе режимы доступа к файлу.
Подробней можно почитать в статье про chmod.
Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение.
Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция
>>> stat.filemode(0o755)
'?rwxr-xr-x'
Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров.
А что за знак вопроса в начале?
Давайте передадим в эту функцию необрезанное значение от os.stat
>>> stat.filemode(os.stat(path).st_mode)
'drwxr-xr-x'
Это данные, которые мы безжалостно обрезали в прошлый раз😼
Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l).
Вот простая схема данной кодировки
[1][3][3][3]
│ │ │ │
│ │ │ └──> Others Permissions
│ │ └─────> Group Permissions
│ └────────> Owner Permissions
└───────────> File Type
(разверните экран если вы с телефона)
Если вы попробуете получить пермишены для симлинка то получите пермишены для файла
>>> path = '.venv/bin/python3'
>>> stat.filemode(os.stat(path).st_mode)
'-rwxr-xr-x'
Чтобы получить свойства именно симлинка, нужно это явно указать
>>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode)
'lrwxrwxrwx'
#tricks#basic
🚨#Shibarium encountered technical problem just 2 hours after its launch on Aug 17, 10 PM UTC (8 hours ago).
We noticed:
1. Whale 0x00b smartly closed his $BONE deal right before the launch and the following price drop.
• sold his last 146.9K $BONE for 237K $USDC at $1.612 8 hours ago (~the local peak)
• Total profit from $BONE investment: $866K (+30.4%)
2. There are 964.46 $ETH ($1.73M) allegedly locked on the #Shibarium cross-chain bridge
👉 Link to the full article: https://platform.spotonchain.ai/signal-details/highlighted-activities-pre-and-post-the-launch-of-shibarium-network-468
🤔🤔 Gigantic whale continues accumulating more $SHIB, it received a total of 382B $SHIB ($4M) in the last 24 hours.
Likely he has a big bet on #shibarium Public Beta launching soon 🔥
The whale currently holds 20.4T $SHIB (~$213,8M)
Address link: https://etherscan.io/address/0x73af3bcf944a6559933396c1577b257e2054d935
🧐With #Shibarium launching, we detected some whales start accumulating $BONE.
- These smart traders recently bought $SYN before its #Binance listing.
🤔Could $BONE be listed on larger exchanges ? Read more details below 👇
https://twitter.com/spotonchain/status/1628439005263167488
Hey, #ShibaArmy🐶
We are officially live on zealy
You can now complete our Quests on Zealy.
Every XP you get in Zealy can be used to redeem $BALL token airdrops
🎖️Join Now : zealy.io/c/ballexchange
#Shibarium#SummerOfShibarium#ShibaArmy#Airdrop#Airdrops
🐾 Hey, #SHIBARMY, listen up! 📢
🚀🪐 Level up your crypto game with WOOFTools: the ultimate trading solution❣️
📈 Real-time crypto prices? ✅
💼 Easy DEFI portfolio management? 💥
🔔 Customizable price alerts? ✅
💰 Exclusive rewards with $WOOFS? 🌐🇨🇳
Say goodbye to complicated platforms - WOOFTools has your back! 😎
🌐 Seamless integration, all in one place! No more jumping around. Trade like a pro with ease.
Ready to rock the cryptocurrency world? 🔥🔥 Join the WOOFTools community now!
The First DEX for #Shibarium in real time!
🌐 Website:
https://wooftools.io
📢 Telegram: https://t.me/Woof_Tools
🇨🇳Chinese 💬: https://t.me/wooftoolsChinese
$WOOFS will be released on IDO this Q3, early access on Telegram group !
Unleash your trading potential and stay ahead of the curve! 📈💥
#WOOFTools#Crypto#DeFi#TradingRevolution#ShibArmy
#Shibarium
Nfa DYOR
The Crypto Prophet (@ShibaProphet) Tweeted:
The 2nd Parabolic is Starting
Buckle up. It's going higher than before
#Shiba#SHIB#ShibaCoin#SHIBARMY#shibainu#shibainu#ShibaSwap#SHIBDELETEAZERO#shibarium#ShibaProphethttps://t.co/uxWOszyTh5https://twitter.com/ShibaProphet/status/1446214042071277572?s=20