I copied pr_bias_c.nc and pr_bias_r.nc netCDF files from pendrive to my ncl_data directory on Ubuntu 14.04. The copied files are existed according to ls -l:
beata#beata-HP-Z420-Workstation:~/ncl_data$ ls -l
total 5220
-rw-rw-r-- 1 beata beata 376916 zář 19 08:05 climatological_mean_monthly_pr_1971-2000_sm.nc
-rw-rw-r-- 1 beata beata 376916 zář 19 08:05 climatological_mean_monthly_pr_2021-2050_sm.nc
-rw-rw-r-- 1 beata beata 376916 zář 19 08:05 climatological_mean_monthly_pr_2071-2100_sm.nc
-rw-rw-r-- 1 beata beata 182514 zář 19 08:29 Fig4.png
-rw-rw-r-- 1 beata beata 7853 zář 19 08:04 lambert.ncl
-rw-rw-r-- 1 beata beata 193911 zář 19 08:28 lcmask.000001.png
-rw-rw-r-- 1 beata beata 1080 zář 15 12:24 plot_pr.ncl
-rw-r--r-- 1 beata beata 376248 zář 19 10:54 pr_bias_c.nc
-rw-r--r-- 1 beata beata 376224 zář 19 11:05 pr_bias_r.nc
-rw-r--r-- 1 beata beata 1339 zář 15 10:19 simple_plot_pr.ncl
-rw-r--r-- 1 beata beata 1092 zář 14 12:55 simple_plot_pr.ncl~
-rw------- 1 beata beata 376888 zář 19 09:22 UNEP_1971-2000.nc
-rw-rw-r-- 1 beata beata 377252 zář 19 09:29 UNEP_1971-2000_sm.nc
-rw------- 1 beata beata 376888 zář 19 09:23 UNEP_2021-2050.nc
-rw-rw-r-- 1 beata beata 377252 zář 19 09:35 UNEP_2021-2050_sm.nc
-rw------- 1 beata beata 376888 zář 19 09:24 UNEP_2071-2100.nc
-rw-rw-r-- 1 beata beata 377252 zář 19 09:36 UNEP_2071-2100_sm.nc
-rw------- 1 beata beata 376948 zář 19 09:20 UNEP_E-OBS.nc
-rw-rw-r-- 1 beata beata 377304 zář 19 09:37 UNEP_E-OBS_sm.nc
When I type ncdump -h pr_bias_c.nc I get ncdump: pr_bias_c.nc: No such file or directory. The netcdf files are correct. I can use them in Matlab or in PanoplyJ softwares on Windows. I do not understand why they are not available on Ubuntu?
Related
Goal: Get Poetry working in my Anaconda3 venvs.
I'm using Anaconda3, via. Git Bash in PyCharm.
I installed Poetry using:
conda install -c conda-forge poetry
Location:
C:\Users\dabell\Anaconda3\Lib\site-packages\poetry
C:\Users\dabell\Anaconda3\Scripts\poetry.exe
$ ls -alrth
total 376K
-rw-r--r-- 3 HDS+dabell 4096 81 Mar 31 15:37 __init__.py
-rw-r--r-- 3 HDS+dabell 4096 1.4K Apr 20 06:53 poetry.py
-rw-r--r-- 3 HDS+dabell 4096 506 Apr 20 06:53 locations.py
-rw-r--r-- 3 HDS+dabell 4096 5.3K Apr 20 06:53 factory.py
-rw-r--r-- 3 HDS+dabell 4096 99 Apr 20 06:53 exceptions.py
-rw-r--r-- 3 HDS+dabell 4096 23 Apr 20 06:53 __version__.py
-rw-r--r-- 3 HDS+dabell 4096 92 Apr 20 06:53 __main__.py
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 core/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 __pycache__/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 _vendor/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 config/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 console/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 inspection/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 installation/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 io/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 json/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 layouts/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 masonry/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 mixology/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 packages/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 ./
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 publishing/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 puzzle/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 repositories/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 utils/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 version/
drwxr-xr-x 1 HDS+dabell 4096 0 Jun 16 15:30 ../
However, in (base) or in any (<venv>) - when I run:
$ poetry install pandas
bash: poetry: command not found
python -m poetry install pandas:
C:\Users\dabell\Anaconda3\envs\sdg\python.exe: No module named poetry
I added it to .bashrc, and still get the above error:
$ export PATH="$HOME/.poetry/bin:$PATH"
or
$ export PATH=C:/Users/dabell/Anaconda3/Lib/site-packages/poetry:$PATH
$ poetry install pandas
bash: poetry: command not found
$ winpty poetry install pandas
winpty: error: cannot start 'poetry': Not found in PATH
$ $HOME/.poetry/bin
bash: /c/Users/dabell/.poetry/bin: No such file or directory
HDS+dabell#PF2DCSXD MINGW64 ~/Documents/GitHub/lumada-catalog/synthetic-data-gen/sdg (daniel_sims)
$ export PATH=/C/Users/dabell/Anaconda3/Lib/site-packages/poetry:$PATH
HDS+dabell#PF2DCSXD MINGW64 ~/Documents/GitHub/lumada-catalog/synthetic-data-gen/sdg (daniel_sims)
$ poetry install pandas
bash: poetry: command not found
$ echo $PATH
/C/Users/dabell/Anaconda3/Lib/site-packages/poetry:/c/Users/dabell/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/dabell/bin:/c/Users/dabell/Anaconda3/envs/sdg:/c/Users/dabell/Anaconda3/e
nvs/sdg/Library/mingw-w64/bin:/c/Users/dabell/Anaconda3/envs/sdg/Library/usr/bin:/c/Users/dabell/Anaconda3/envs/sdg/Library/bin:/c/Users/dabell/Anaconda3/envs/sdg/Scripts:/c/Users/dabell/Anaconda3/envs/sdg/bin:/c/User
s/dabell/Anaconda3/condabin:/c/Program Files/Common Files/Oracle/Java/javapath:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/Windo
wsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files (x86)/gs/gs9.56.1/bin:/c/Users/dabell/AppData/Local/Programs/Python/Python310:/usr/bin/vendor_perl:/usr/bin/core_perl
I have a WiFi adapter plugged into my computer, I can find it's ID numbers by looking through the output of lsusb.
Bus 005 Device 009: ID 1737:0071 Linksys WUSB600N v1 Dual-Band Wireless-N Network Adapter [Ralink RT2870]
This is the only wiFi adapter I have plugged in currently, so this obviously is it. I searched around in /sys/bus/usb/devices/ until I found this path on my machine
# ls -l /sys/bus/usb/devices/5-3.1:1.0/
total 0
-rw-r--r-- 1 root root 4096 Dec 28 18:11 authorized
-r--r--r-- 1 root root 4096 Dec 28 18:11 bAlternateSetting
-r--r--r-- 1 root root 4096 Dec 28 18:06 bInterfaceClass
-r--r--r-- 1 root root 4096 Dec 28 18:06 bInterfaceNumber
-r--r--r-- 1 root root 4096 Dec 28 18:06 bInterfaceProtocol
-r--r--r-- 1 root root 4096 Dec 28 18:06 bInterfaceSubClass
-r--r--r-- 1 root root 4096 Dec 28 18:11 bNumEndpoints
lrwxrwxrwx 1 root root 0 Dec 28 18:06 driver -> ../../../../../../../../bus/usb/drivers/rt2800usb
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_01
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_02
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_03
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_04
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_05
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_06
drwxr-xr-x 3 root root 0 Dec 28 18:11 ep_81
drwxr-xr-x 3 root root 0 Dec 28 18:06 ieee80211
drwxr-xr-x 5 root root 0 Dec 28 18:06 leds
-r--r--r-- 1 root root 4096 Dec 28 18:11 modalias
drwxr-xr-x 3 root root 0 Dec 28 18:06 net
drwxr-xr-x 2 root root 0 Dec 28 18:11 power
lrwxrwxrwx 1 root root 0 Dec 28 18:06 subsystem -> ../../../../../../../../bus/usb
-r--r--r-- 1 root root 4096 Dec 28 18:11 supports_autosuspend
-rw-r--r-- 1 root root 4096 Dec 28 18:06 uevent
By looking at the driver symbolic link I see this is using the rt2800usb driver. So this has to be the correct entry for my WiFi adapter. But identifying based off kernel driver name is inexact and I would prefer not do it that way. Is there a file under /sys/bus/usb/devices/5-3.1:1.0/ that can tell me the vendor ID and the product ID of the entry I am looking at?
I am trying to split a file base on 2 column values.
Able to split a file based on one column
awk -F\| '{print>$1}' file1
Data Needs to be split based on column 2nd and 5th ( If column2 = 3 AND column5=M)
A1|3|100|20|M
A1|5|101|20|N
A1|5|101|30|M
A1|3|105|20|O
B1|3|150|5|M
A1|3|106|20|Q
A1|5|101|20|N
A1|5|101|30|Q
A1|5108|20|O
B1|3|150|5|M
Output : File 1
A1|5|101|20|N
A1|5|101|30|M
A1|3|105|20|O
A1|3|106|20|Q
A1|5|101|20|N
A1|5|101|30|Q
A1|5108|20|O
Output: File 2
A1|3|100|20|M
B1|3|150|5|M
B1|3|150|5|M
cat file1
A1|3|100|20|M
A1|5|101|20|N
A1|5|101|30|M
A1|3|105|20|O
B1|3|150|5|M
A1|3|106|20|Q
A1|5|101|20|N
A1|5|101|30|Q
A1|5108|20|O
B1|3|150|5|M
Try this:
awk -F\| '{print>$2$5}' file1
Which gives me:
ls -l
total 120
-rw-rw-r-- 1 tink tink 26 Jun 21 12:22 3M
-rw-rw-r-- 1 tink tink 15 Jun 21 12:22 3M
-rw-rw-r-- 1 tink tink 14 Jun 21 12:22 3O
-rw-rw-r-- 1 tink tink 14 Jun 21 12:22 3Q
-rw-rw-r-- 1 tink tink 13 Jun 21 12:22 5108
-rw-rw-r-- 1 tink tink 15 Jun 21 12:22 5M
-rw-rw-r-- 1 tink tink 14 Jun 21 12:22 5N
-rw-rw-r-- 1 tink tink 15 Jun 21 12:22 5N
-rw-rw-r-- 1 tink tink 14 Jun 21 12:22 5Q
-rw-rw-r-- 1 tink tink 140 Jun 21 12:16 file1
I'm getting myself familiar with Linux (Debian 9). However I managed to get myself confused with the ls command manual. I made up the following trivial setting for testing:
meouser:~/triv_dir$ ls -laR
.:
total 24
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 .
drwxr-xr-x 19 meouser meouser 4096 Mar 27 15:41 ..
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 a
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:42 b
-rw-r--r-- 1 meouser meouser 6 Mar 27 15:44 c
-rw-r--r-- 1 meouser meouser 6 Mar 27 15:44 d
./a:
total 24
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 .
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 ..
-rw-r--r-- 1 meouser meouser 4 Mar 27 15:50 aa
-rw-r--r-- 1 meouser meouser 4 Mar 27 15:50 ab
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 a_sub_1
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 a_sub_2
./a/a_sub_1:
total 12
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 .
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 ..
-rw-r--r-- 1 meouser meouser 4 Mar 27 15:55 aaa
./a/a_sub_2:
total 8
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 .
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 ..
./b:
total 16
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:42 .
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 ..
-rw-r--r-- 1 meouser meouser 4 Mar 27 15:50 ba
-rw-r--r-- 1 meouser meouser 4 Mar 27 15:50 bb
I would like to see all the directory names and their subdirectories, but not the filenames. That is, I want something like ls --insert-options-here so that the output is this subset from above:
.:
total 24
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 .
drwxr-xr-x 19 meouser meouser 4096 Mar 27 15:41 ..
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 a
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:42 b
./a:
total 24
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:55 .
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 ..
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 a_sub_1
drwxr-xr-x 2 meouser meouser 4096 Mar 27 15:55 a_sub_2
According to ls manual that should be achieved by ls -ldR.
meouser:~/triv_dir$ man ls
-a, --all
do not ignore entries starting with .
-d, --directory
list directories themselves, not their contents
-l use a long listing format
-R, --recursive
list subdirectories recursively
But this is what happens instead: only the '.' is shown.
meouser:~/triv_dir$ ls -ldR
drwxr-xr-x 4 meouser meouser 4096 Mar 27 15:42 .
What am I missing from the manual?
I noticed from https://stackoverflow.com/a/29277454/11199684 that this can be achieved by
find . -maxdepth 2 -type d -print
which is impressive but it gives less information than the ls output above. Besides, I might not know beforehand the correct maxdepth? And above all, for future needs I'm actually interested in teaching myself from the manuals. Advice are appreciated.
The -d option apply to [FILE] given as input, in your case, as none are given, you fall back to the default one : the current directory. The recursivity doesn't apply as no directory are returned.
To get the same output as ls with the find command, you can combine them :
find . -type d -exec ls -ld {} \;
in some way you could use the grep tool to filter the results:
ll -A | grep ^d
if you want to use it programatically, in a bash script you can have only the dir names (but find might be better for that):
ll -A | grep / | awk '{print $9}'
I am receiving the error
git push jhaase1 master
fatal: unable to bind to '~/.git-credential-cache/socket': Operation not permitted
fatal: cache daemon did not start:
fatal: unable to bind to '~/.git-credential-cache/socket': Operation not permitted
fatal: cache daemon did not start:
Everything up-to-date
However, this is not an ownership issue like in other posts I have looked at
$ cd ~
$ ls -la
total 174
drwx------ 42 jhaase1 campus 4096 Oct 12 14:20 .
drwx------ 2 root root 8192 Sep 26 09:15 ..
-rw------- 1 jhaase1 campus 11280 Sep 21 08:20 .ICEauthority
drwxr-xr-x 10 jhaase1 campus 2048 Oct 29 2014 .Mathematica
-rw------- 1 jhaase1 campus 10470 Oct 12 14:20 .Xauthority
-rw------- 1 jhaase1 campus 455 Jun 4 2012 .Xauthority_tmp
drwxr-xr-x 6 jhaase1 campus 2048 Aug 12 19:55 .allinea
lrwxr-xr-x 1 jhaase1 campus 14 May 21 2012 .bashrc -> Public/.bashrc
-rw------- 1 jhaase1 campus 8160 Oct 6 2015 .bash_history
lrwxr-xr-x 1 jhaase1 campus 19 May 21 2012 .bash_logout -> Public/.bash_logout
lrwxr-xr-x 1 jhaase1 campus 20 May 21 2012 .bash_profile -> Public/.bash_profile
drwxr-xr-x 6 jhaase1 campus 2048 Jun 22 17:01 .cache
drwxr-xr-x 6 jhaase1 campus 2048 Jun 14 18:01 .comsol
drwx------ 11 jhaase1 campus 2048 Sep 23 23:12 .config
lrwxr-xr-x 1 jhaase1 campus 13 May 21 2012 .cshrc -> Public/.cshrc
drwx------ 3 jhaase1 campus 2048 May 28 2013 .dbus
-rw-r--r-- 1 jhaase1 campus 592 Jul 16 2012 .emacs
drwxr-xr-x 3 jhaase1 campus 2048 May 25 2012 .emacs.d
-rw-r--r-- 1 jhaase1 campus 308 Aug 30 12:41 .emacs-places
-rw------- 1 jhaase1 campus 16 Jun 16 17:11 .esd_auth
drwxr-xr-x 4 jhaase1 campus 2048 Jun 22 16:59 .fastx_server
drwxr-xr-x 157 jhaase1 campus 12288 May 17 18:08 .felix
-rwxr-xr-x 1 jhaase1 campus 73 Dec 3 2012 .flexlmrc
drwx------ 3 jhaase1 campus 2048 Jul 29 12:11 .fltk
drwxr-xr-x 2 jhaase1 campus 2048 Jun 21 15:28 .fontconfig
drwx------ 5 jhaase1 campus 2048 Oct 12 12:41 .gconf
drwx------ 2 jhaase1 campus 2048 Oct 12 12:42 .gconfd
-rw-r--r-- 1 jhaase1 campus 79 Oct 12 10:52 .gitconfig
drwx------ 2 jhaase1 campus 2048 Sep 21 23:10 .git-credential-cache
drwx------ 7 jhaase1 campus 2048 Jun 20 11:25 .gnome2
drwx------ 2 jhaase1 campus 2048 May 25 2012 .gnome2_private
drwxr-xr-x 2 jhaase1 campus 2048 Nov 6 2013 .gstreamer-0.10
-rw-r--r-- 1 jhaase1 campus 0 Aug 6 2013 .gtk-bookmarks
drwx------ 2 jhaase1 campus 2048 Jun 16 17:11 .gvfs
-rw------- 1 jhaase1 campus 5085 Oct 11 23:03 .history
drwxr-xr-x 2 jhaase1 campus 2048 Jun 17 15:34 .icons
-rw-r--r-- 1 jhaase1 campus 15690 Sep 21 08:29 .imsettings.log
drwxr-xr-x 4 jhaase1 campus 2048 Sep 16 21:45 .local
lrwxr-xr-x 1 jhaase1 campus 13 May 21 2012 .login -> Public/.login
-rw-r--r-- 1 jhaase1 campus 166 Dec 3 2012 .maple_history
drwxr-xr-x 14 jhaase1 campus 2048 May 17 11:41 .matlab
drwxr-xr-x 2 jhaase1 campus 2048 Aug 13 2012 .memscape
-rw-r--r-- 1 jhaase1 campus 375 Oct 3 12:36 .moose-profile
drwxr-xr-x 5 jhaase1 campus 2048 Sep 7 2015 .mozilla
drwxr-xr-x 2 jhaase1 campus 2048 Aug 18 2014 .nautilus
drwxr----- 3 jhaase1 campus 2048 Oct 20 2014 .pki
drwx------ 2 jhaase1 campus 2048 Jun 22 17:00 .pulse
-rw------- 1 jhaase1 campus 256 Sep 5 2014 .pulse-cookie
drwxr-xr-x 2 jhaase1 campus 2048 Jun 1 2012 .qt
-rw------- 1 jhaase1 campus 589 Jun 4 17:14 .smpd
drw------- 2 jhaase1 campus 2048 Jan 6 2016 .ssh
drwxr-xr-x 3 jhaase1 campus 2048 Nov 13 2014 .subversion
drwxr-xr-x 2 jhaase1 campus 2048 Jun 17 15:34 .themes
drwx------ 4 jhaase1 campus 2048 Jun 17 15:34 .thumbnails
drwx------ 4 jhaase1 campus 2048 Jul 17 2012 .totalview
drwxr-xr-x 5 jhaase1 campus 2048 Sep 20 17:03 Desktop
drwxr-xr-x 4 jhaase1 campus 2048 Sep 1 2015 Documents
drwxr-xr-x 3 jhaase1 campus 2048 Jul 18 22:52 Downloads
drw------- 2 jhaase1 campus 2048 Jun 4 2012 Public
drwxr-xr-x 100 root root 4096 Dec 31 1969 YESTRDAY
drwxr-xr-x 7 jhaase1 campus 2048 Oct 12 13:03 bin
drwxr-xr-x 3 jhaase1 campus 2048 Dec 20 2013 intel
drwxr-xr-x 4 jhaase1 campus 2048 Oct 3 09:43 moose-base
drw------- 6 jhaase1 campus 2048 Oct 3 13:52 private
lrwxr-xr-x 1 jhaase1 campus 48 Oct 5 19:01 zapdos -> ~/moose-base/zapdos
Anything else I can try?