More than one way to skin a cat ------------------------------ There are often lots of equally legitimate commands or combinations of commands to achieve the same purpose. Example: /files$ head -n 12 names.txt | tail -n 5 (Print out the first 12 lines, and then print out the last 5 lines of that) is the same as /files$ tail -n +8 names.txt | head -n 5 (Print out everything starting with line 8, then print the first 5 lines of that) is pretty much the same as: /files$ tail -n +8 names.txt > temporaryfile.txt /files$ head -n 5 temporaryfile.txt /files$ rm temporaryfile.txt (Save everything starting with line 8 to a temporary file, then print the first 5 lines of that, then delete the temporary file) --- ## Questions/Comments/Suggestions ## Noah Veltman Web: http://noahveltman.com Twitter: [@veltman](http://twitter.com/veltman) Email: [noah@noahveltman.com](mailto:noah@noahveltman.com) admin@i-051bc54d50ccea613:~/clmystery$ cd .. admin@i-051bc54d50ccea613:~$ ls agent clmystery mysolution admin@i-051bc54d50ccea613:~$ cd clmystery/ admin@i-051bc54d50ccea613:~/clmystery$ c
command-line-murders/i-051bc54d50ccea613
by SadServersMore by SadServers
init.scope loade apparmor.service loade chrony.service loade cloud-config.service loade cloud-final.service loade cloud-init-local.service loade cloud-init.service loade cron.service loade dbus.service loade flaskapp.service loade getty@tty1.service loade gotty.service loade ifup@ens5.service loade ifupdown-pre.service loadeadmin@i-0fbe29e33a2c45173:~$ ps -aux
paris/i-0fbe29e33a2c45173 05:54
by SadServersdrwxr-xr-x 7 admin admin 4096 Feb 25 18:58 . drwxr-xr-x 3 root root 4096 Sep 17 2023 .. drwx------ 3 admin admin 4096 Sep 17 2023 .ansible -rw-r--r-- 1 admin admin 220 Aug 4 2021 .bash_logout -rw-r--r-- 1 admin admin 3526 Aug 4 2021 .bashrc drwxr-xr-x 3 admin admin 4096 Feb 25 18:58 .config -rw-r--r-- 1 admin admin 807 Aug 4 2021 .profile drwx------ 2 admin admin 4096 Sep 17 2023 .ssh drwxr-xr-x 2 admin root 4096 Sep 17 2023 agent drwxr-xr-x 2 admin root 4096 Sep 17 2023 data -rw-r--r-- 1 root root 5368709120 Sep 17 2023 datafile -rwxr-xr-x 1 admin root 2207109 Sep 17 2023 kihei admin@i-09dfc3938430c3175:~$ admin@i-09dfc3938430c3175:~$ admin@i-09dfc3938430c3175:~$