Hi I would like to run a script from the terminal, is there anyway to do that? For example : if I have a python script I would normally run it with this command :    python script.py   How can I run this script just by typing in the filename of the script in the terminal (even if i'm in another directory) ?  Another answer I found pretty helpful :    You can just create symlink. Create it in /usr/local/bin. All you need is to run command:  sudo ln -s /full/path/to/your/file /usr/local/bin/name_of_new_command   After that you should make your file executable:  chmod +x /full/path/to/your/file   Now you should be able to run name_of_new_command at any time in your terminal.  Note that this is good solution only for home usage of Linux.
I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh
Does %* in batch file mean all command line arguments? How does vendor restocking work in Fallout 4? I've been looking for 2mm EC ammo and according to the  it is supposed to restock every 48 hours at Arturo. However he has not gotten any new 2mm EC ammo for at least 10 restocks.   Do vendors restock on a random selection of items with some being more likely than others? Is there a max limit to how many different items a vendor will sell so that no new items will be added to stock after this limit is reached? Is there a level limit on what items can be restocked? I bought 2mm EC ammunition once from Arturo so I assume I'm high enough level if that's the case? What is the difference between these two ways to calculate average velocity? Average velocity:  $$v_{\rm avg,1}=\frac{v_{\rm final}+v_{\rm initial}}{2}$$   and average velocity:   $$v_{\rm avg,2} =\frac{\rm total\;displacement}{\rm time \;taken}=\frac{\Delta x}{\Delta t} $$  What is the difference between them and when do we use them? I've tried to read and understand this:   As a test, since my layout is "Polish, programmer" in the /usr/share/X11/xkb/symbols/pl file I played with remapping the 'q' character to 'x', and it worked just fine.  But what I want, is to remap LWIN (Left Super) to Left Control.   So I tried this: I started editing /usr/share/X11/xkb/symbols/pc file, assuming this is the 'root' of all the other files. Commented out this line:  //key &lt;LWIN&gt; {  [ Super_L       ]   };   and added this one:  key &lt;LWIN&gt; {    [ Control_L     ]   };   and rebooted PC, with no success. I.e. LWIN + C, doesn't copy selected text in text editors to clipboard, instead it just produces the 'c' letter. In the terminal instead of stopping current programm it also just produces the 'c' letter.  Here is my config file:   When I try the xev command and then press the Left Control Key, I see this:  KeyPress event, serial 40, synthetic NO, window 0x5a00001,     root 0x7e, subw 0x0, time 1053321, (374,-259), root:(374,545),     state 0x0, keycode 133 (keysym 0xffe3, Control_L), same_screen YES,     XKeysymToKeycode returns keycode: 37     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False  KeyRelease event, serial 40, synthetic NO, window 0x5a00001,     root 0x7e, subw 0x0, time 1053425, (374,-259), root:(374,545),     state 0x0, keycode 133 (keysym 0xffe3, Control_L), same_screen YES,     XKeysymToKeycode returns keycode: 37     XLookupString gives 0 bytes:      XFilterEvent returns: False   BTW. Ask ubuntu suggests me two links to similar questions, but they are old, and suggest using xmodmap, and afaik it's no longer correct answer on Ubuntu >= 16.04 (Xenial) and this is precisely the version I have.  BTW2. I would really like to avoid using apps like Xbindkeys, considering there is a built in solution, which I guess I almost understand, and already spent some time on trying to understand it. What is the term for replacing a name or brand with a funny pejorative / sardonicism? What is the term for when one replaces a well-known name [(Proper) noun, company, brand, etc.] with one that tries to be funny yet pejoratively descriptive, different but similar enough that one's audience can likely understand the replacement?  For example: Whole Foods ===> Whole Paycheck; Comcast ==> Scumcast; Starbucks ==> Charbucks; Kinko's == Stinko's; eBay ==> Evil Bay  I tend to use sobriquet don't believe this explicitly implies funny as well as insulting. Moniker again is close but not specific to the above description.  There is a similar question which proposes tortonym and malapropsim, but it does not seem to settle the argument definitively:   Another answer here proposes dysphemism, but to me it isn't a full fit:  because it doesn't cover the humor aspect. difference fn(String... args) vs fn(String[] args) Whats this syntax useful for :       function(String... args)   Is this same as writing       function(String[] args)    with difference only while invoking this method or is there any other feature involved with it ? Lets say an object is tied to a string and it is being swung in a circle:    In this case, the tension of the string acts as a centrifugal force that keeps the object moving in a circle. However, if centrifugal force is the only force acting on the object, why doesn't it collapse into the center? I am pretty sure this has to do with the object's inertia (or the centrifugal pseudo-force), where it moves slightly forward in a tangent before falling, restoring the orbit.  Also, what keeps the string taut during the swinging? There has to be some force countering the centripetal force that keeps the string tight. I think this might again have to do with the intertia/centrifugal pseudo-force but can a pseudo-force balance a real force? Also, if centripetal were to be balanced by the pseudo-force, wouldn't the object not move at all (since the net force would be 0)? Displaying row/column of point in raster using QGIS? Best way to encode list names in sharepoint 2013 rest url's? Proving that 1- and 2-d simple symmetric random walks return to the origin with probability 1 How does one prove that a simple (steps of length $1$ in directions parallel to the axes) symmetric (each possible direction is equally likely) random walk in $1$ or $2$ dimensions returns to the origin with probability $1$?  Edit: note that while returning to the origin is guaranteed $(p = 1)$ in $1$ and $2$ dimensions, it is not guaranteed in higher dimensions; this means that something in a correct justification for the $1$- or $2$-d case must fail to extend to $3$-d (or fail when the probability for each direction drops from $\frac14$ to $\frac16$). If the edges of the complete graph $K_{17}$ (on 17 vertices with no three collinear) are each colored one of three colours can it be proven to have two or more monochromatic triangles? I know this is a very common corollary of the class equation. And I know how to do it by using class equation.   But can you do it bu using group action, maybe find a nice set for G to act on? $x^2-y^2=2s$, s cannot be an odd integer How can we prove that if $x^2-y^2=2s$ holds, s cannot be an odd integer. What theorem in number theory should we use? How to shrink Windows 7 boot partition with unmovable files I have just bought an HP laptop with Windows&nbsp;7 (64 bit). It has a 500&nbsp;GB HDD with three partitions: a small hidden system partition, a 12&nbsp;GiB HP recovery partition, and a 450&nbsp;GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100&nbsp;GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20&nbsp;GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows&nbsp;7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows&nbsp;7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions. So I am on Minecraft playing on my friends world (Not server). However, they won't go online for no reason. I want to go continue my work on that world and not start brand new on survival again. I've already made a lot of progress and would not like to lose it, can somebody help? I've already tried to get answers but they are either too complicated or for servers like IP. Offset a background image from the right using CSS Textbooks on linear regression with least squares Cut points and connected space How can I set custom key bindings and key macros on Mac OS X? I recently upgraded to Snow Leopard, from Leopard and I was using an awesome app called  that let you remap your keys, set scripts/macros and even had repeat functionality.   However, this app doesn't seem to be in active development anymore, and 10.6 broke the ability to bind certain modifier keys (Shift) with other keys.   I totally miss things like Shift+Insert for paste (Linux/Windows), setting Ctrl+Shift+Esc for Activity Monitor, and Ctrl+Alt+Del for the login window.   So, how can I achieve this instead? Why don't we allow low reputation users to insert more than two images in their posts? I was searching for privileges one can get after a certain amount of reputation, and I ended up with this question in my mind: Why don't we allow users with low reputation to insert more than two images or links in their posts?  Is it good to make restrictions for them? Let's say someone is going to post a good question and he/she needs to insert three images to explain it properly; because this can't be done the question may become vague or incomplete to answer, and ultimately be flagged by others. Is this a rational decision for those users?  Yes, I believe that restrictions should be there to make a control over new users like for voting privileges but is it good to make restrictions on Questions and Answers?  Here is my question:  Is it decent to restrict new users in such a manner?