LINUX_SRV Telegram 408
Выводим список файлов в домашней директории без использования ls или его алиасов


1. dir

dir -aA ~

2. printf

printf "%s\n" ~/* ~/.*

3. echo

echo -e 'echo \t\ty\b\b\b\b\b\b\b' | bash -i
echo -e 'echo \t\ty\b\b\b\b\b\b\b' | sh -i

3. vim

vim ~

4. rm

yes "n" | rm -i $HOME/* $HOME/.* 2>&1|grep -o "$HOME[^']*"
(echo y; yes n) | rm -ir ~ 2>&1 | sed -E -e "s/(rm:[^']+)|\?//g"

5. rsync

rsync --list-only ~/

6. grep

grep -l '.*' ~/* ~/.* 2>/dev/null || grep -L '.*' ~/* ~/.* 2>/dev/null

7. file

file ~/* ~/.*

8. stat

stat ~/* ~/.*|grep "/home"|awk '{print $2}'
stat -c "%A %G:%U %s %x %n" * \.*
stat *|awk '/File:/{print $2}'

9. head

head -n 0 -v ~/* ~/.*|awk '{print $2}'

10. getfacl

getfacl ~/* ~/.* | grep "# file" | awk '{print $3}'

11. git

git init ~/ ; curr=`pwd`; cd ~ ; git status; rm -rf .git; cd $curr ; curr=''

12. cat

cat ~ |strings |xargs -IX sh -c 'test -e X && echo X'

13. lsattr

lsattr ~/* ~/.* 2>&1 | grep -Po '/.*'
2👍2



tgoop.com/linux_srv/408
Create:
Last Update:

Выводим список файлов в домашней директории без использования ls или его алиасов


1. dir


dir -aA ~

2. printf

printf "%s\n" ~/* ~/.*

3. echo

echo -e 'echo \t\ty\b\b\b\b\b\b\b' | bash -i
echo -e 'echo \t\ty\b\b\b\b\b\b\b' | sh -i

3. vim

vim ~

4. rm

yes "n" | rm -i $HOME/* $HOME/.* 2>&1|grep -o "$HOME[^']*"
(echo y; yes n) | rm -ir ~ 2>&1 | sed -E -e "s/(rm:[^']+)|\?//g"

5. rsync

rsync --list-only ~/

6. grep

grep -l '.*' ~/* ~/.* 2>/dev/null || grep -L '.*' ~/* ~/.* 2>/dev/null

7. file

file ~/* ~/.*

8. stat

stat ~/* ~/.*|grep "/home"|awk '{print $2}'
stat -c "%A %G:%U %s %x %n" * \.*
stat *|awk '/File:/{print $2}'

9. head

head -n 0 -v ~/* ~/.*|awk '{print $2}'

10. getfacl

getfacl ~/* ~/.* | grep "# file" | awk '{print $3}'

11. git

git init ~/ ; curr=`pwd`; cd ~ ; git status; rm -rf .git; cd $curr ; curr=''

12. cat

cat ~ |strings |xargs -IX sh -c 'test -e X && echo X'

13. lsattr

lsattr ~/* ~/.* 2>&1 | grep -Po '/.*'

BY Типичный Сисадмин


Share with your friend now:
tgoop.com/linux_srv/408

View MORE
Open in Telegram


Telegram News

Date: |

On Tuesday, some local media outlets included Sing Tao Daily cited sources as saying the Hong Kong government was considering restricting access to Telegram. Privacy Commissioner for Personal Data Ada Chung told to the Legislative Council on Monday that government officials, police and lawmakers remain the targets of “doxxing” despite a privacy law amendment last year that criminalised the malicious disclosure of personal information. With the sharp downturn in the crypto market, yelling has become a coping mechanism for many crypto traders. This screaming therapy became popular after the surge of Goblintown Ethereum NFTs at the end of May or early June. Here, holders made incoherent groaning sounds in late-night Twitter spaces. They also role-played as urine-loving Goblin creatures. How to Create a Private or Public Channel on Telegram? Telegram has announced a number of measures aiming to tackle the spread of disinformation through its platform in Brazil. These features are part of an agreement between the platform and the country's authorities ahead of the elections in October. A Hong Kong protester with a petrol bomb. File photo: Dylan Hollingsworth/HKFP.
from us


Telegram Типичный Сисадмин
FROM American