When I want to execute a file, it seems that I always have to first 'cd' into that file's directory before executing it, unless it fails on a can't-find-my-dataz type error.
How can I get around typing two commands to just execute a program?
Example:
cd /usr/local/bin/minecraft/ java -Xms512M -Xmx2048M -jar minecraft.jar
How can I make that into one line, so as I can put it as my Exec=_ line when creating a custom launcher in Gnome3?
Open the Command prompt, type in cd followed by the directory you want to move into, and hit Enter. Change the Windows directory by entering the drive name followed by : in the Command prompt, and hit Enter. In the Command prompt, type cd and drag the folder you want to move into from the GUI.
Change Current Working Directory ( cd ) To change directories, use the command cd followed by the name of the directory (e.g. cd downloads ). Then, you can print your current working directory again to check the new path.
To move a file or directory from one location to another, use the command mv. Common useful options for mv include: -i (interactive) — Prompts you if the file you have selected overwrites an existing file in the destination directory. -f (force) — Overrides the interactive mode and moves without prompting.
Change Directories Using the Drag-and-Drop Method If the folder you want to open in Command Prompt is on your desktop or already open in File Explorer, you can quickly change to that directory. Type cd followed by a space, drag and drop the folder into the window, and then press Enter.
cd /usr/local/bin/minecraft/ && java -Xms512M -Xmx2048M -jar minecraft.jar
should do it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With