Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for answer to How do I tell if a file does not exist in Bash? by BlueCacti

Current License: CC BY-SA 4.0

Post Revisions

19 events
when toggle format what by license comment
Dec 9, 2024 at 0:33 comment added JRichardsz -e when file location is a string variable. Thanks
Apr 5, 2024 at 18:55 history edited marcelocra CC BY-SA 4.0
Mention that `-e` also check symlinks.
Mar 15, 2022 at 12:07 history edited BlueCacti CC BY-SA 4.0
Previous edit added little to no relevant info. Didn't fit the location it was appended to and didn't make use of code styling. Manpage for `test` is already mentioned in John's comment.
Mar 14, 2022 at 11:10 history edited U. Windl CC BY-SA 4.0
Add reference to manual page
Sep 18, 2021 at 10:53 comment added Nate T Regarding the -G operator, the two are slightly different, as I understand it. going by the "SETUID & SETGID BITS" section of the chmod man-page, the two would give different values in the case of root user, would they not. I am referring specifically to the "unless user has appropriate permissions" part. Regardless, excellent answer. Bookmarking for this alone.
Nov 11, 2020 at 3:39 comment added MaXi32 @MzA because we need to make the code readable, nobody knows what is 1ドル. So assign 1ドル as file and then use that file variable to do something else looks more readable than using an unknown argument 1ドル
Apr 12, 2019 at 8:30 comment added Mz A why didn't some add a function like function exists() { ⏎ if [ -e "1ドル" ]; then echo "1ドル exists" else echo "1ドル does not exist" fi }
Jul 19, 2018 at 20:18 review Suggested edits
Jul 20, 2018 at 5:46
Mar 27, 2018 at 5:20 review Suggested edits
Mar 27, 2018 at 12:22
Jul 8, 2016 at 16:02 history edited BlueCacti CC BY-SA 3.0
Undid previous edit as it did not assist in the readability of the post
S Jul 7, 2016 at 4:48 history suggested Paul Parker CC BY-SA 3.0
Made it into a table for neater presentation.
Jul 7, 2016 at 3:25 review Suggested edits
S Jul 7, 2016 at 4:48
S Dec 30, 2014 at 11:33 history edited Martin Tournoij CC BY-SA 3.0
added 52 characters in body
Dec 30, 2014 at 11:31 review Suggested edits
S Dec 30, 2014 at 11:33
Sep 14, 2014 at 2:08 history edited ormaaj CC BY-SA 3.0
Clarify pipeline negation vs test expression negation.
May 5, 2014 at 11:06 comment added BlueCacti About -n: The unary operator -z tests for a null string, while -n or no operator at all returns True if a string is not empty. ~ ibm.com/developerworks/library/l-bash-test/index.html
May 5, 2014 at 11:03 history edited BlueCacti CC BY-SA 3.0
added 1 character in body
May 5, 2014 at 10:59 comment added BlueCacti @0x90 If you want, you are free to edit my post and add it to the list. I guess you mean: -n String - Check if the length of the string isn't zero. Or do you mean file1 -nt file2 - Check if file1 is newer then file 2 (you can also use -ot for older then)
Jan 16, 2014 at 14:25 history answered BlueCacti CC BY-SA 3.0
toggle format

AltStyle によって変換されたページ (->オリジナル) /