Questions tagged [path]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Android: Getting free space of an empty MediaStore storage/volume? [migrated]

I am trying to determine a free space of a MediaStore storage (an SD card - MediaStore.VOLUME_EXTERNAL_PRIMARY in my case). The following code works OK: Uri videoContentUri = MediaStore.Video.Media....
Pavel Hofman's user avatar
0 votes
0 answers
24 views

HAProxy: How to retain the url path in the backend local ip?

Aim: url: trigger.mydomain.com ---> backend: 192.168.2.22:8080 url: trigger.mydomain.com/web ---> backend: 192.168.2.22:9999/web I know how to do the first url, but not the second url. How to ...
bthoven's user avatar
1 vote
2 answers
248 views

Apache rewrite rule for a folder to a different domain

I need to redirect all requests concerning a folder to another (old) web server called www2 keeping the entire original path, for example https://www.example.org/thisfolder/maps/map.jsp?id=2345 must ...
Steph's user avatar
  • 13
1 vote
1 answer
111 views

take the value from path in location and return it along with a string in nginx [closed]

I am a newbie in the world of Nginx. While learning it, I am trying to accomplish this: I want to return a string whenever someone hits this URL: /greet/user and the string will be 'Hello user.' So, ...
lone wolf's user avatar
1 vote
1 answer
48 views

extract full path FIND with special character handling

Executing a comand like: find /some_path -mtime -3 -type f -name "*.txt" the out is something like: /some_path/file 1.txt /some_path/file2.txt If I include this output in rsync with ...
Jacopo Nasi's user avatar
0 votes
1 answer
171 views

Zsh function for checking for duplicate PATH entries and for occluded executables

This occurs on many systems and I expect someone has a solution for it. The PATH environment variable is a major part of security issues. For sanity's sake, the path portion of the .zshrc looks like: ...
Charles Merriam's user avatar
0 votes
2 answers
99 views

Best Path for nginx Files [closed]

I've always struggled with various paths for nginx files and where they should be positioned. As we know, we can change where we can park both the www directories for our web app, as well as the ...
Rich_F's user avatar
  • 125
0 votes
1 answer
89 views

Is there a way in Nginx to remove a route specified in location from one domain and port and forward it to reverses proxy?

I want to connect example.com:80 and example.com:82 to a specific site through reverse proxy. localhost/api/buy/ -> http://example.com:80/ localhost/api/sell/ -> http://example.com:82/ I set ...
john_smith's user avatar
0 votes
1 answer
462 views

How do I do multiple nginx reverse proxies?

I want to connect example.com/api/buy and example.com/api/sell to a specific site through reverse proxy. So I am trying to connect through localhost/api/buy and localhost/api/sell with nginx. I set up ...
john_smith's user avatar
0 votes
1 answer
206 views

Getting command not found using sudo, but not for running command as root without sudo

wierd issue where if you use sudo command for certain commands it is not found. But runnning it as root user WITHOUT sudo does work root@ip-172-31-43-153:/home/ubuntu# sudo xfs_growfs -d / sudo: ...
user2958456's user avatar
1 vote
0 answers
1k views

nginx configuration for nextcloud with path

I run nextcloud on docker (image nextcloud:production-fpm) with an nginx-container (image: nginx) as reverse-proxy (handling SSL-termination) based on the example nginx-configuation (https://raw....
soriak's user avatar
  • 13
1 vote
0 answers
6k views

macos: env: python: No such file or directory when I use dot slash on a .py file

I thought all I had to do was add things to my path and pythonpath but MAC os still cannot find Python when I do a ./myfile.py etc... my .zshrc: export PATH="/Library/Frameworks/Python.framework/...
Codejoy's user avatar
  • 139
1 vote
1 answer
345 views

Nginx - Block access to portion of path only, to all but specified IP range

I'm trying block access to a portion of a path via Nginx, unless the source IP is within a specified range. I think I've got this mostly working through much trial and error, but I seem to run into ...
Ren's user avatar
  • 11
0 votes
1 answer
1k views

Setup A Default Redirect In Nginx

I need a way to redirect clients when no existing path is defined. When I put a return 301 config in, nginx seems to ignore any location configs. It redirects everything. The hostname in the ...
Coldburn's user avatar
1 vote
1 answer
517 views

Wine in Docker - "reg add" only keeps effects temporarily

Ive been bashing my head against a wall about this. I'm looking to add an executable to the PATH under wine on Ubuntu 20.04. Trying to configure this from the dockerfile, but having a weird issue. ...
Awbmilne's user avatar
3 votes
1 answer
21k views

Permanently add to $PATH on MacOS

I am trying to add to my $PATH on MacOS (Monterey) When I use export PATH=$PATH:~/.composer/vendor/bin It will add it to $PATH and I can see it when I use echo $PATH However when I reboot the ...
Lawrence Cooke's user avatar
-1 votes
1 answer
2k views

Programatically get full path to binary in powershell (which, where, Get-Command)

How do I get the absolute path to a given binary and store it to a variable? What is the equivalent to the following for Linux Bash in Windows Powershell? user@disp985:~$ path=`which gpg` user@disp985:...
Michael Altfield's user avatar
0 votes
1 answer
717 views

I need to rename a file and insert a date

I'm trying to set a daily process to locate a file, rename it and insert the previous date in the file name. I want the file to be named "Filename_MMddyyyy.csv" with MMddyyyy being the ...
DemagusMiyan1980's user avatar
0 votes
1 answer
663 views

su - with automatic change directory once su command is done in shell scripting

im not familiar in shell scripting but im trying to achieve at least this script but my problem is once superuser rt is done logging in it brings me to this [rt@superuser root]$ instead of reading ...
Newbiecoder's user avatar
0 votes
1 answer
357 views

Azure App Service portal not working after misconfiguration

I was trying to setup path mappings for my PHP Azure Web App, I was attempting to every virtual path under a certain path directory redirect to a single PHP index file. So for example: /myapp/ would ...
The Mighty Wizard's user avatar
1 vote
1 answer
424 views

Where shared object is located in Linux

I want to know, where .so file information got stored in linux? I am looking for libruby.so.2.6. When I searched in internet, ld.so first starts the search with LD_LIBRARY_PATH and then it will look ...
Kishore Kumar's user avatar
0 votes
1 answer
1k views

Libruby.so library not in default library location

I have installed rh-ruby26 on my machine as a root user and it got installed under /opt/rh/rh-ruby26/root/bin/ruby..when I have tried to execute a script , am getting "error while loading shared ...
Kishore Kumar's user avatar
1 vote
0 answers
154 views

Setting Apache SSL path dynamically based on domain

Trying to replace SSL path with the current domain. <IfModule mod_ssl.c> <VirtualHost *:443> ServerAlias * UseCanonicalName ...
Ramjith Ap's user avatar
0 votes
0 answers
107 views

Redirect request of subdomain to server/path

Currently, we are having two webservers, the first one is directly handling request from domain1.com. I'm trying to deploy another webserver in which it will handle request from sub.domain2.com. ...
Long H Pham's user avatar
0 votes
1 answer
873 views

I broke my terminal trying to set up PATH environment to bin the JAVA directory and now nothing works, no bash commands, etc. Can I reset?

Basically I was just trying to set up a PATH environment variable that pointed to the /bin directory inside the main Java directory. I did this by doing: sudo nano /etc/paths. But then couldn't get ...
raveyp's user avatar
  • 1
1 vote
0 answers
141 views

Terraform, specifying location for vms on datastore

I was wondering as I couldn't find it in the documentation or I've missed it a lot. I am using Terraform 0.12.9 with newest vsphere provider. My goal is to do a clone from a template and it basically ...
Ricardo Sliva's user avatar
2 votes
0 answers
2k views

Configure NGINX by passing CLI parameters instead of config file

I am looking for a way to change some config parameters dynamically before running NGINX. Perfectly by using command line parameters. I want to write a bash script that takes for example two ...
Jimmix's user avatar
  • 121
-1 votes
1 answer
432 views

Can't change global PATH environment in ubuntu 18.04

I tried editing /etc/environment, changed it by removing games and adding my swift installation location, so now it looks like: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/...
iMoses's user avatar
  • 111
0 votes
1 answer
54 views

Loading new paths from each line on a text file with eval dont update $PATH variable on bash

Having to set a lot of paths on $PATH then wrote this code to load it from a text file: #!/bin/bash cd ~ echo '#++++++' >> ./pathlstbkp cat ./pathlst >> ./pathlstbkp while ...
Mark's user avatar
  • 101
1 vote
1 answer
28 views

Odd requests for urls that are the *body* of my CSS files

I'm not sure quite how to express this but my NodeJS server has recently been getting errors because some middleware library is unable to parse certain parameters from urls. When I look at which urls ...
MalcolmOcean's user avatar
1 vote
1 answer
174 views

TFS: Inconsistencies in git web source code browser

We have been using on premise Team Foundation Server v. 15.117.27414.0. Everything has been working fine, except on the project's web portal, on the Code page (code explorer), all of the files that ...
David's user avatar
  • 439
0 votes
0 answers
3k views

haproxy redirect URL path to another path

haproxy version 1.5.18 I want to redirect: /document/(.*)/(.*)/somefile => /anotherPath/somefile For example: redirect /document/20181/20182/a_good_pic.jpg => /anotherPath/a_good_pic.jpg ...
r ne's user avatar
  • 101
1 vote
1 answer
2k views

Using credential name to map network folder that has identical form

We have a network share over vpn to a windows server in a different city. each person has a username to access the folder (and only that specific folder) his/her folder is same as username. user os is ...
bogga88's user avatar
  • 21
0 votes
1 answer
401 views

Find unique paths in one text file from two files using powershell

I have two text files with a list of paths. They share some paths but they also have their own unique paths as well. Each path is on different line and there are thousands of lines on each txt file. ...
Cian McGovern's user avatar
1 vote
1 answer
323 views

Windows PATH Variable with a Drive-letterless path

At work, we have a setup where our product's source code is mounted to a drive letter, and if you want to have different builds, you have different drives. The build tools are reached by adding ...
Katherine1's user avatar
1 vote
2 answers
13k views

PowerShell Get-ChildItem - Path Too Long

I have been stuck with trying to format my output table for a Get-ChildItem command. I have created a script to scan a directory defined in $Source to search for files defined by $Months and $Size. ...
ZazzyTech's user avatar
0 votes
1 answer
3k views

Apache 2.4 Proxy Css and Js path

I got Apache Web Server 2.4, and a JBoss 7 exposing a web project. Since I'm working locally I made an /etc/hosts/ domain entry like: 127.0.0.1 testmask And put this virtual host config inside ...
Black.Jack's user avatar
1 vote
2 answers
2k views

How to extract the last two (or any number) directories from a path with sed?

I'm really looking for a generic solution here, but for the sake of example, let's say I'm looking for the deepest 2 directories in a path. e.g.: Given a path /home/someone/foo/bar, how can I use sed (...
steve c c's user avatar
  • 158
0 votes
1 answer
26 views

Paths of files on Google Nearline changed

While I was recovering files by CloudBerry, I realized that the paths of nearly all files on the Google Cloud are altered. It should be G:\2014\Photo Video Source Files\UTS construction video\...
ttanemori's user avatar
3 votes
2 answers
6k views

using powershell to update system path doesn't immediately work?

I am trying to use powershell to update Windows system path by : $oldpath = (Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name ...
jack.chen.job's user avatar
1 vote
1 answer
68 views

What's the most common and recommended directory for a web application on FreeBsd? [closed]

I have a website on a FreeBSD server which is reachable from the Internet. I know I can run it from whichever directory I wish. But still, which directory is more right, common and recommended? At the ...
Ko32mo's user avatar
  • 13
2 votes
1 answer
2k views

Using mod_rewrite to remove PATH_INFO from URL

UPDATE: Mostly solved. Now it only doesn't work if in the situation where you are trying to access http://www.example.com/any-real-file-without-an-extension/anything-afterwards-that-doesnt-end-in-a-...
Ben Yep's user avatar
  • 23
2 votes
1 answer
6k views

Why is PATH different when launching Jenkins slave via launchctl?

I have a Jenkins slave running on macOS via ssh slave, then screen, then launching following script, which makes sure to reconnect the server if it goes down: #!/usr/bin/env bash function startSlave(...
electronix384128's user avatar
0 votes
1 answer
379 views

usb drive persistent mapping(ubuntu 16.04)

I'd like to map an usb drive to a path under ubuntu 16.04. The idea is to use rsync to backup some folders to this usb drive whenever I plug it. Is there any way for the system to recognize the usb ...
Rani7c2's user avatar
1 vote
1 answer
1k views

Removing a recursive folder that's not recursive in windows fails with "Source Path Too Long"

I seem to have managed to get an Application Data folder recurse into itself somehow, doesn't look recursive but somehow still is and now I find myself unable to remove that folder. The folder itself ...
Lieven Keersmaekers's user avatar
0 votes
1 answer
52 views

Google compute engine Debian, $PATH getting reset after exiting from Putty

I have a debian instance on Google cloud. I needed to host a Play! Framework project. For this I installed a software Activator and added it to path as follows export PATH=/home/user/activator-dist-1....
Shabin Muhammed's user avatar
1 vote
1 answer
123 views

Bash, script that check soft [closed]

i have a script on bash: s=0 if [ -f /usr/bin/curl ] && [ -x /usr/bin/curl ] ; then echo "Utility ...... curl [ ok ]" else echo "Utility ...... curl [fail]" s=1 fi if [ -...
Valeriu's user avatar
  • 43
1 vote
2 answers
2k views

nginx multiple paths (too many)

i got this working nginx config: server { listen 80; server_name mydomain.com; root /var/www/mydomain/wordpress; index index.html index.php; location /customer1 { alias /var/www/...
vladimir prieto's user avatar
0 votes
0 answers
3k views

Network path was not found while joining domain (samba)

I have my AC server on 10.0.0.2 (debian, samba installed). From PC1 (notebook, windows 7 professional) I can easy join my domain and all things are good. But from PC2 (windows 7 professional too) I ...
Wowol's user avatar
  • 1
0 votes
1 answer
2k views

How can I modify the $PATH used by my vagrant provisioning script?

I have a shell script in /etc/profile.d that adds some directories to my $PATH, but vagrant doesn't see when running a privileged provisioning script. This uses sudo and sudo does not see this ...
wsaxton's user avatar
  • 195

1
2 3 4 5