Comments (7)
I updated the README and created PR #43
from pishrink.
FYI, running sudo ./pishrink.sh ...
works if you don't do sudo mv pishrink.sh /usr/local/bin
;-) (but then you end up with the pishrink.sh
'hanging around' in your home directory).
More details, for reference:
You're correct, ./
does mean use a relative directory reference, it means look in the current directory. But since you've now moved pishrink.sh
from the current directory to /usr/local/bin
, you either need to use sudo /usr/local/bin/pishrink.sh ...
, or you can just use sudo pishrink.sh ...
since /usr/local/bin
is included in the $PATH
variable. When you run a 'bare command' with no path prefix, the shell (in your case bash) looks for the command in each of the directories specified in $PATH
.
from pishrink.
Thanks @lurch and @framps. I knew the bare command would look in the current directory plus anything in $PATH
I knew ./ made it look in the current directory. I did not know it prevented it from looking in $PATH
. Still learning my way around this stuff (as I guess is obvious).
from pishrink.
@John-Mc You're close... 😉 by default on Linux the current directory is never in the $PATH
so if you have pishrink.sh
in e.g. your home directory, then trying to run sudo pishrink.sh ...
would fail, you either need to run sudo ./pishrink.sh ...
or e.g. sudo /home/pi/pishrink.sh ...
If you give an explicit path to an executable (and ./
is an explicit path to the current directory), then the shell doesn't need to try searching the $PATH
to find it :)
from pishrink.
@John-Mc Can this be closed, now that the README has been updated?
from pishrink.
Closing since its already merged
from pishrink.
Sure. Sorry, I didn't know the etiquette of closing an issue. I figured it was up to the site owner.
from pishrink.
Related Issues (20)
- Detect when parted changes PARTUUID
- Add image cleanup support
- Remove current image cleanup code
- Add better detection of existing /etc/rc.local changes HOT 1
- FEATURE REQUEST: BTRFS support HOT 2
- ERROR occurred in line 300: tune2fs failed. Unable to shrink this type of image. HOT 1
- unexpected end of file error HOT 1
- File System not expanding HOT 2
- possibility to add costum scripts to the new iso?
- Raspbian not completly booting - No GUI underscore blinking HOT 3
- Filesystem not expanding if rc.local does not exist
- Option to resize partition to a given size? HOT 1
- Typo in line 394 trunate to truncate
- pishrink writes to stderr instead of stdout
- new shrink image is not running. HOT 3
- After the image is clipped, the power indicator is off after the system is shut down
- ERROR occurred in line 304: tune2fs failed HOT 7
- shrinkPi for Sonoma HOT 2
- [Tip/Idea]: Make Releases to check if update is necessary
- it could shrink the Debian/Ubuntu image on my PC. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pishrink.