TGViewer
Useful Tools | Linux | GitOps | DevOps Useful Tools | Linux | GitOps | DevOps @gitgate · 6.78K subscribers
Post #709 3.54K
Совет дня:

Условные выражения для файлов в bash

## True if file exists.
[[ -a ${file} ]]

## True if file exists and is a block special file.
[[ -b ${file} ]]

## True if file exists and is a character special file.
[[ -c ${file} ]]

## True if file exists and is a directory.
[[ -d ${file} ]]

## True if file exists.
[[ -e ${file} ]]

## True if file exists and is a regular file.
[[ -f ${file} ]]

## True if file exists and is a symbolic link.
[[ -h ${file} ]]

## True if file exists and is readable.
[[ -r ${file} ]]

## True if file exists and has a size greater than zero.
[[ -s ${file} ]]

## True if file exists and is writable.
[[ -w ${file} ]]

## True if file exists and is executable.
[[ -x ${file} ]]

## True if file exists and is a symbolic link.
[[ -L ${file} ]]


PS. в линукс все есть файл или поток :)

PPS. И переменные окружения.


опубликовано в @gitgate

#tips #bash
  • 👍 39
  • 🔥 13
More from @gitgate
  1. Oct 5, 2026nvitop - интерактивный просмотрщик процессов NVIDIA-GPU и не только, универсальное решение…
  2. Oct 3, 2026House Planner - планировщик частного дома, двухмерный план этажа в реальном масштабе, трех…
  3. Oct 2, 2026Совет дня: В macOS для предотвращения перехода дисплея в режим сна используется команда: c…
  4. Oct 2, 2026Move Mouse - простая программа, предназначенная для имитации действий пользователя. Изнача…
  5. Oct 1, 2026bash-agent - минималистичная среда выполнения для ИИ-программистов. Чистый bash + awk, ник…
  6. Sep 29, 2026M-Commander - текстовый файловый менеджер в полноэкранном режиме: две панели, встроенный р…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →