Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 1979  / 1 Year ago, thu, march 2, 2023, 1:06:14

The name of the file is '[' . When I open it up in vi it looks like it's a copy of 'test'. It's owned by root.


More From » 11.04

 Answers
4

That file is supposed to be there (or under /usr/bin/[). It allows you to type, for instance, [ -f $HOME/.bashrc ] && echo ".bashrc exists", which is equivalent to test -f $HOME/.bashrc && echo ".bashrc exists".



Reality is a bit more complicated, since bash overrides /usr/bin/[ with its own [, so you can use the [ executable by providing a full path, /usr/bin/[ -f $HOME/.bashrc ] && echo ".bashrc exists".


[#35983] Friday, March 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itutejagua

Total Points: 89
Total Questions: 124
Total Answers: 113

Location: British Indian Ocean Territory
Member since Sun, Feb 13, 2022
2 Years ago
;