Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

find The current directory is included in the PATH environment variable

Featured Replies

I'm trying to use find and run a execdir on .rar files for mass unpacking but i'm getting the error that . is in the $path. Should'nt that be removed?

 

"find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons)"

 

https://askubuntu.com/questions/621132/why-using-the-execdir-action-is-insecure-for-directory-which-is-in-the-path

Edited by Tuumke

  • 1 year later...

Sorry to resurrect an old thread. I'm currently running into the same issue and wondering whether you solved it.

 

I'm trying to run ' find /mnt/user/downloads/ -name '*.rar' -execdir unrar e "{}" \; '

Edited by Toml

  • 2 years later...

Sorry to resurrect an old thread... but to anyone coming across this problem in future, here is an easy solve applying a little beginner linux knowledge;

 

# Take a backup of $PATH to restore later
# Note: This will only keep the variable alive for the current session!
$ PATH_TEMP=$PATH

# ... just to make sure the $PATH_TEMP variable has been stored
$ echo $PATH_TEMP
.:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# Print the current $PATH so we can extract all paths except the current directory, so we can override it
$ echo $PATH
.:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
#-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Copy everything BUT the first current directory marker (.) and break character (:)

# Next, export the modified $PATH to override it for the current session using the string you copied above
$ export PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# ... just to make sure the $PATH variable change has been stored
$ echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# ---
# ... now you can run the find command!
# ---

# To restore the session $PATH either close your current terminal session and start a new one, or to manually restore
# the current session, lets load $PATH back from the $PATH_TEMP variable set earlier
$ export PATH=$PATH_TEMP

# ... verify everything is back to normal. Looking good!
$ echo $PATH
.:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

 

Edited by unraidyn

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.