Welcome to The Carpentries Etherpad! This pad is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents. Use of this service is restricted to members of The Carpentries community; this is not for general purpose use (for that, try etherpad.wikimedia.org). Users are expected to follow our code of conduct: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html All content is publicly available under the Creative Commons Attribution License: https://creativecommons.org/licenses/by/4.0/ http://cheatsheetworld.com/programming/unix-linux-cheat-sheet/ Hi! Hi Morning :) Ciao! Hello hey https://software-carpentry.org/lessons/ Go to: http://swcarpentry.github.io/shell-novice/setup.html download data-shell.zip and move this to your desktop https://gitforwindows.org/ --> ls -l? ls -l -h? (The lowercase letter ``ell''.) List in long format. (See below.) A total sum for all the file sizes is output on a line before the long listing. when showing file information for a symbolic link, show information for the file the link references rather than for the link itself -h human readable (base) re-byodm-145-109-96-173:~ fran$ ls -l total 8 drwx------@ 5 fran staff 160 May 11 2017 Applications drwxrwxr-x@ 4 fran staff 128 Dec 2 09:01 Creative Cloud Files drwx------@ 7 fran staff 224 Dec 2 09:33 Desktop drwx------@ 8 fran staff 256 Jun 19 22:39 Documents drwx------+ 4 fran staff 128 Dec 2 09:26 Downloads drwx------@ 6 fran staff 192 Dec 2 09:02 Google Drive drwx------@ 71 fran staff 2272 Mar 10 2019 Library drwx------+ 6 fran staff 192 May 15 2019 Movies drwx------+ 4 fran staff 128 Oct 3 2018 Music drwx------+ 7 fran staff 224 Apr 2 2017 Pictures drwxr-xr-x+ 6 fran staff 192 May 11 2017 Public -rw------- 1 fran staff 1 Dec 1 16:06 nano.save output Thomas: ls -l total 32057 drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 '3D Objects'/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:50 Anaconda3/ drwxr-xr-x 1 Gebruiker 197121 0 Aug 19 23:10 AppData/ lrwxrwxrwx 1 Gebruiker 197121 34 Aug 19 23:08 'Application Data' -> /c/Users/Gebruiker/AppData/Roaming/ drwxr-xr-x 1 Gebruiker 197121 0 Feb 20 2019 CLC_Data/ drwxr-xr-x 1 Gebruiker 197121 0 Feb 20 2019 CLCdatabases/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Contacts/ lrwxrwxrwx 1 Gebruiker 197121 62 Aug 19 23:08 Cookies -> /c/Users/Gebruiker/AppData/Local/Microsoft/Windows/INetCookies/ drwxr-xr-x 1 Gebruiker 197121 0 Feb 22 2018 'Creative Cloud Files'/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:37 Desktop/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 22 12:03 Documents/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:33 Downloads/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 21 09:29 Dropbox/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Favorites/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:26 IntelGraphicsProfiles/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Links/ lrwxrwxrwx 1 Gebruiker 197121 32 Aug 19 23:08 'Local Settings' -> /c/Users/Gebruiker/AppData/Local/ lrwxrwxrwx 1 Gebruiker 197121 63 Aug 19 23:08 'Menu Start' -> '/c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/Start Menu'/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 7 2017 MicrosoftEdgeBackups/ lrwxrwxrwx 1 Gebruiker 197121 28 Aug 19 23:08 'Mijn documenten' -> /c/Users/Gebruiker/Documents/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Music/ lrwxrwxrwx 1 Gebruiker 197121 70 Aug 19 23:08 NetHood -> '/c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/Network Shortcuts'/ lrwxrwxrwx 1 Gebruiker 197121 70 Aug 19 23:08 Netwerkprinteromgeving -> '/c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/Printer Shortcuts'/ -rw-r--r-- 1 Gebruiker 197121 13893632 Dec 2 09:25 NTUSER.DAT -rw-r--r-- 1 Gebruiker 197121 13279232 Aug 19 23:08 ntuser.dat.LOG1 -rw-r--r-- 1 Gebruiker 197121 3399680 Aug 19 23:08 ntuser.dat.LOG2 -rw-r--r-- 1 Gebruiker 197121 65536 Aug 19 23:08 NTUSER.DAT{1486b5a4-c2cc-11e9-b663-b6fbf2adf0ee}.TM.blf -rw-r--r-- 1 Gebruiker 197121 524288 Aug 19 23:08 NTUSER.DAT{1486b5a4-c2cc-11e9-b663-b6fbf2adf0ee}.TMContainer00000000000000000001.regtrans-ms -rw-r--r-- 1 Gebruiker 197121 524288 Aug 19 23:08 NTUSER.DAT{1486b5a4-c2cc-11e9-b663-b6fbf2adf0ee}.TMContainer00000000000000000002.regtrans-ms -rw-r--r-- 1 Gebruiker 197121 20 Aug 19 23:38 ntuser.ini drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:29 OneDrive/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Pictures/ drwxr-xr-x 1 Gebruiker 197121 0 Mar 7 2019 R/ lrwxrwxrwx 1 Gebruiker 197121 59 Aug 19 23:08 Recent -> /c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/Recent/ drwxr-xr-x 1 Gebruiker 197121 0 Sep 27 2016 Roaming/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 'Saved Games'/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Searches/ lrwxrwxrwx 1 Gebruiker 197121 59 Aug 19 23:08 SendTo -> /c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/SendTo/ lrwxrwxrwx 1 Gebruiker 197121 62 Aug 19 23:08 Sjablonen -> /c/Users/Gebruiker/AppData/Roaming/Microsoft/Windows/Templates/ drwxr-xr-x 1 Gebruiker 197121 0 Dec 2 09:33 surfdrive/ drwxr-xr-x 1 Gebruiker 197121 0 Jun 22 2016 Tracing/ drwxr-xr-x 1 Gebruiker 197121 0 Nov 15 00:22 Videos/ arranges by time in reverse What happens if you combine -t and -r in ls? (base) Juliettes-MacBook-Air:data-shell juliettesilven$ ls -r writing solar.pdf pizza.cfg notes.txt north-pacific-gyre molecules data creatures (base) Juliettes-MacBook-Air:data-shell juliettesilven$ ls -tr solar.pdf pizza.cfg notes.txt north-pacific-gyre molecules writing data creatures sort by modifation date and reverse order of the list oldest file first cd ~ cd .. cd cd ~/data/.. cd cd .. *original/ pnas_final/ pnas_sub/ append indicator to the folder one up; thus to users mv statstics.txt statistics.txt ls *thane.pdb ls *t??ne.pdb 95.0 102 95.0 102 95.0 102 95.0 102 95.0 102 Hopper Grace Hopper Grace Hopper Grace test filenames = ['very_long_name1', 'very_long_name2', 'very_long_name3', \ 'middle_len1', 'middle_len', 'shrt_nm1', 'shrt_nm2' ] %matplotlib inline import numpy import glob import matplotlib.pyplot filenames = sorted(glob.glob('inflammation*.csv')) def is_data_OK(array_with_data): # check whether data is fine if numpy.sum((numpy.min(array_with_data, axis=0))) == 0: print('Data dodgy') return False else: print('Data is fine') return True def plot_data(array_with_data): #plot data fig = matplotlib.pyplot.figure(figsize=(10.0, 3.0)) axes1 = fig.add_subplot(1,3,1) axes2 = fig.add_subplot(1,3,2) axes3 = fig.add_subplot(1,3,3) axes1.set_ylabel('average') axes1.plot(numpy.mean(array_with_data, axis=0)) axes2.set_ylabel('max') axes2.plot(numpy.max(array_with_data, axis=0)) axes3.set_ylabel('min') axes3.plot(numpy.min(array_with_data, axis=0)) matplotlib.pyplot.show() return fig for filename in filenames[:3]: print(filename) # loading data into array data = numpy.loadtxt(fname=filename, delimiter = ',') # check whether data is fine if is_data_OK(data): # plot data plot_data(data)