If I wanted to run two separate commands on one line, I could do this:
cd /home; ls -al
or this:
cd /home && ls -al
And I get the same results. However, what is going on in the background with these two methods? What is the functional difference between them?
;is a really dangerous (at least with rm command), for examplecd /some/dir; rm -fr ./*. So with such destructive operation you must be sure that you are in the right place before execute rm. The right command iscd /some/dir && rm -fr ./*– ALex_hha Apr 18 '16 at 14:23