Что-то вы гоните насчет "привычного вида формата 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
Token LIBRA Crashes 94% in Hours
🚨 Argentine President Javier Milei's promoted token LIBRA plummeted 94% shortly after launch, with insiders cashing out over $107 million. Initial market cap peaked at $4.56 billion but has dropped to $174 million. The token was marketed as a tool to boost Argentina's economy. Milei later removed his promotional post and blamed political opponents for the fallout.
📉 Link to details: Full story
#Crypto#Argentina#LIBRA#Trading#MarketCrash#TokenSale#InsiderTrading#ETH#VC
#Crypto#Argentina#LIBRA#Trading#MarketCrash#TokenSale#InsiderTrading#ETH#VC
🚀 Covenant AI Founder Sells 37,000 TAO Tokens
According to Foresight News, crypto influencer Jesus Martinez has reported that Covenant AI founder Sam Dare sold 37,000 TAO tokens six hours ago.
#CovenantAI#TAOTokens#CryptoNews#SamDare#CryptoInfluencer#JesusMartinez#TokenSale
🚀 Blockchain Energy is LIVE! 🔥
The world’s first physical blockchain product is here—introducing Blockchain Energy! 💥 Our website and ICO are officially LIVE, and early buyers can now purchase BET tokens at.
www.blockchainenergy.co.uk.
💰 Buy early before prices increase! Price alerts and community updates will be shared exclusively on our Telegram group – join now: https://t.me/+vLcj22SyWvY2ZDg0
🔗 Powering the future of blockchain with real-world energy!
#BlockchainEnergy#BETToken#CryptoLaunch#ICO#BlockchainRevolution#CryptoCommunity#Web3#CryptoInvesting#TokenSale#CryptoPresale
Errol Musk's Token Plans to Raise Millions
Errol Musk aims to raise $150-$200 million through the "Musk It" memecoin, leveraging his family name. Proceeds will support the newly established Musk Institute. Recently, the crypto space has faced various rug pulls linked to projects of the same name. 🪙💰Read more here
#Musk#Memecoin#Crypto#ETFs#USDC#Ethereum#DeFi#Blockchain#Investment#Finance#ElonMusk#Bitcoin#WhaleAlert#RugPull#MuskInstitute#CryptoMarket#DigitalAssets#TokenSale#Cryptocurrency#MarketTrends#VC
$1M Raised for E3 Enclave Project
Open-source protocol E3 Enclave successfully raised $1M during its public sale, achieving a $60M fully diluted valuation. The sale was conducted on the Legion platform.
Meanwhile, AI-focused protocol BAD Coin secured $1.25M at a $12.5M valuation, emphasizing growth in the AI and crypto sectors.
Read more: E3 Enclave | BAD Coin
#E3Enclave#BADCoin#AI#Crypto#PublicSale#Blockchain#Funding#Legion#Investment#TechNews#Finance#DeFi#Innovation#Startups#VentureCapital#CryptoNews#TokenSale#Valuation #2025 #Oklahoma#Fraud
Major Crypto Transactions and Trends Unveiled
🚨 A massive transfer of 25,000,000 #XRP ($81.44M) has been reported from #Upbit to an unknown wallet. For details, visit Whale Alert.
The Ethereum Foundation sold 100 ETH for 336,000 DAI amidst discussions on staking options, highlighting ongoing regulatory concerns voiced by Vitalik Buterin in a recent tweet here.
Additionally, Bitcoin volatility spikes as the price reaches $109K, correlating with a surge in investment inflows totaling $2.2 billion this past week, largely driven by euphoria surrounding the Trump inauguration. For more on the latest market trends, refer to CoinShares report.
#XRP#Bitcoin#Ethereum#Crypto#Investment#Regulation#DeFi#Funding#VC#Upbit#TokenSale#CryptoMarket#WhaleAlert#Trump#Hawala#MemeToken#Finance#DAI#CryptoTrends#Layergg#Grix