copy specific file in command line - sed

I want to copy specific file done last changes in Oct 16-17,file type is java.
shia#ubuntu:~/code$ ls -alxo
total 96
drwx------ 2 shia 4096 Oct 20 18:54 .
drwxr-xr-x 61 shia 12288 Oct 20 19:24 ..
-rw------- 1 shia 12288 Oct 16 21:52 .Reuse.java.swp
-rw-rw-r-- 1 shia 746 Oct 20 11:16 Argus.class
-rw-rw-r-- 1 shia 302 Oct 20 11:16 Argus.java
-rw------- 1 shia 310 Oct 16 21:30 Call.java
-rw-rw-r-- 1 shia 417 Oct 17 15:20 Ordinary.class
-rw-rw-r-- 1 shia 298 Oct 17 14:57 Overriding.java
-rw-rw-r-- 1 shia 562 Oct 19 21:27 Package.class
-rw-rw-r-- 1 shia 430 Oct 19 21:27 Package.java
-rw------- 1 shia 729 Oct 17 13:50 Reuse.java
-rw------- 1 shia 424 Oct 17 13:47 Room.java
-rw------- 1 shia 321 Oct 16 21:22 Simpleobject.java
-rw-rw-r-- 1 shia 1187 Oct 17 00:04 Static.java
-rw-rw-r-- 1 shia 686 Oct 17 15:20 Super.class
-rw-rw-r-- 1 shia 1010 Oct 17 15:20 Super.java
-rw------- 1 shia 843 Oct 17 14:20 This.java
-rw-rw-r-- 1 shia 521 Oct 17 14:51 b.java
-rw-rw-r-- 1 shia 90 Oct 20 18:54 cp.awk
-rw-rw-r-- 1 shia 105 Oct 20 17:19 file.txt
I try to specific them but i don't know how to copy them.
shia#ubuntu:~/code$ ls -alxo|grep 'Oct 1[67].*java$'|awk '{print $8}'
Call.java
Overriding.java
Reuse.java
Room.java
Simpleobject.java
Static.java
Super.java
This.java
b.java
Any help,thanks a lot!

One way using find:
find . -maxdepth 1 -type f -name "*.java" -newermt 2012-10-16 ! -newermt 2012-10-18 -exec cp '{}' /home/user/dstFolder/ \;

You can use xargs to copy the files found:
...| xargs -i cp '{}' /home/user/dstFolder/
This will copy all the files found to the folder /home/user/dstFolder/.

Related

My symbol column file size in partitioned table is unusually large -- why would that be?

I've just built my first proper q/kdb+ database with splayed and partitioned tables. Everything is going fine, but I just noticed that my symbol s column file size is unusually large. Here is what I can see from the OS and from inside q:
# ls -latr 2017.10.30/ngbarx
total 532
-rw-r--r-- 1 root root 24992 Apr 17 20:53 vunadj
-rw-r--r-- 1 root root 24992 Apr 17 20:53 v
-rw-r--r-- 1 root root 300664 Apr 17 20:53 s
...
q)meta ngbarx
c | t f a
------| -----
date | d
s | s p
v | e
vunadj| e
...
q)get `:2017.10.30/ngbarx/s
`p#`sym$`A`AA`AACG`AADI`AADR`AAIC`AAIC-B`AAL`AAM-A`AAMC`AAME`AAOI`AAON`AAP`AA..
q)-22!get `:2017.10.30/ngbarx/v
24990
q)-22!get `:2017.10.30/ngbarx/s
28678
q)all (get `:2017.10.30/ngbarx/s) in sym
1b
q)count sym
62136
So comparing the real-type v column with the symbol-type s column, I see from ls that the symbol column is more than 10x the size, even though the internal size in bytes is similar and everything seems properly encoded in the sym file.
Is this expected behavior? Or am I doing something wrong that could be fixed?
UPDATE: I have not used compression, and have written the files using the magical function .Q.dcfgnt, which can be viewed here. Well, a slightly modified version, I noticed that this function as is also saved a date file in the directory, even though the column should be virtual, so I did some hacking in k (I'm not very good at it) and updated the inner function .Q.dpfgnt to this ...
k){[d;p;f;g;n;t]if[~&/qm'r:+en[d]t;'`unmappable];
{[d;g;t;i;x]#[d;x;g;t[x]i]}[d:par[d;p;n];g;r;<r f]'{x#&~x=`date}(!r);
#[;f;`p#]#[d;`.d;:;f,r#&~f=r:{x#&~x=`date}(!r)];n}
Applying the parted attribute is not free and requires storage. It is usually not that costly but looking at your sample output of s, it doesn't look suitable for parting as does not contain repeating values:
q)get `:2017.10.30/ngbarx/s
`p#`sym$`A`AA`AACG`AADI`AADR`AAIC`AAIC-B`AAL`AAM-A`AAMC`AAME`AAOI`AAON`AAP`AA..
See below tables created to illustrate the issue:
/ no part - 16 distinct syms
t1:([]s:100000?`1;v:100000?2e)
/ part - 16 distinct syms
t2:update `p#s from `s xasc ([]s:100000?`1;v:100000?2e)
/ no part - 99999 distinct syms
t3:([]s:100000?`8;v:100000?2e)
/ part - 99999 distinct syms
t4:update `p#s from `s xasc ([]s:100000?`8;v:100000?2e)
The difference in size is insignificant between t1 and t2 with the parted attribute(804096 -> 804664). However, when the number of distinct syms / parts becomes very large, the storage cost is very large. (804096 -> 4749872)
ls | xargs ls -latr
t1:
total 1180
-rw-r--r-- 1 matmoore matmoore 12 Apr 19 10:28 .d
-rw-r--r-- 1 matmoore matmoore 804096 Apr 19 10:28 s
-rw-r--r-- 1 matmoore matmoore 400016 Apr 19 10:28 v
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 .
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 ..
t2:
total 1180
-rw-r--r-- 1 matmoore matmoore 12 Apr 19 10:28 .d
-rw-r--r-- 1 matmoore matmoore 804664 Apr 19 10:28 s
-rw-r--r-- 1 matmoore matmoore 400016 Apr 19 10:28 v
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 .
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 ..
t3:
total 1180
-rw-r--r-- 1 matmoore matmoore 12 Apr 19 10:28 .d
-rw-r--r-- 1 matmoore matmoore 804096 Apr 19 10:28 s
-rw-r--r-- 1 matmoore matmoore 400016 Apr 19 10:28 v
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 .
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 ..
t4:
total 5032
-rw-r--r-- 1 matmoore matmoore 12 Apr 19 10:28 .d
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 ..
-rw-r--r-- 1 matmoore matmoore 4749872 Apr 19 10:28 s
-rw-r--r-- 1 matmoore matmoore 400016 Apr 19 10:28 v
drwxr-xr-x 1 matmoore matmoore 4096 Apr 19 10:28 .
I would also question if this column should be a symbol. If 62k is the size of your sym file with just one date created then you should be careful that you are going to end up creating a bloated sym file. If you have a full history from 2017.10.30 and the sym file is still 62k, then it's fine but if you are adding that many new symbols each day, the sym file will quickly spiral out of control.

OpemBMC/Yocto Glibc do_package fails

I am new to OpenBMC/Yocto.
For glibc target, the previous tasks such as do_compile() etc work fine, but fail at do_package() task:
bruin#cl2100 /ssd/devkit/build (master) $ bitbake glibc -c package
WARNING: Layer ast2600-devkit should set LAYERSERIES_COMPAT_ast2600-devkit in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer ast2600-devkit should set LAYERSERIES_COMPAT_ast2600-devkit in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |#############################################################################################################| Time: 0:00:01
Loaded 3353 entries from dependency cache.
Parsing recipes: 100% |###########################################################################################################| Time: 0:00:04
Parsing of 2344 .bb files complete (2274 cached, 70 parsed). 3429 targets, 339 skipped, 0 masked, 0 errors.
WARNING: No bb files matched BBFILE_PATTERN_ast2600-devkit ''
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.42.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "debian-11"
TARGET_SYS = "arm-openbmc-linux-gnueabi"
MACHINE = "ast2600-devkit"
DISTRO = "openbmc-phosphor"
DISTRO_VERSION = "0.1.0"
TUNE_FEATURES = "arm armv7a vfp vfpv4d16 callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-oe
meta-networking
meta-python
meta-webserver
meta-phosphor
meta-aspeed
meta-ami
meta-ast2600-devkit = "master:0a8a6b7628d866c20ac674a213fcba68e34a33c4"
Initialising tasks: 100% |########################################################################################################| Time: 0:00:01
Sstate summary: Wanted 2 Found 1 Missed 1 Current 55 (50% match, 98% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: glibc-2.29-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:perform_packagecopy(d)
0003:
File: '/ssd/devkit/meta/classes/package.bbclass', lineno: 662, function: perform_packagecopy
0658: rpath_replace (dvar, d)
0659:}
0660:perform_packagecopy[cleandirs] = "${PKGD}"
0661:perform_packagecopy[dirs] = "${PKGD}"
*** 0662:
0663:# We generate a master list of directories to process, we start by
0664:# seeding this list with reasonable defaults, then load from
0665:# the fs-perms.txt files
0666:python fixup_perms () {
File: '/usr/lib/python3.9/subprocess.py', lineno: 424, function: check_output
0420: else:
0421: empty = b''
0422: kwargs['input'] = empty
0423:
*** 0424: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
0425: **kwargs).stdout
0426:
0427:
0428:class CompletedProcess(object):
File: '/usr/lib/python3.9/subprocess.py', lineno: 528, function: run
0524: # We don't call process.wait() as .__exit__ does that for us.
0525: raise
0526: retcode = process.poll()
0527: if check and retcode:
*** 0528: raise CalledProcessError(retcode, process.args,
0529: output=stdout, stderr=stderr)
0530: return CompletedProcess(process.args, retcode, stdout, stderr)
0531:
0532:
Exception: subprocess.CalledProcessError: Command 'tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package' returned non-zero exit status 2.
Subprocess output:
tar: ./lib/libpthread.so.0: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/librt.so.1: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libdl.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnss_db.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/ld-linux-armhf.so.3: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnss_compat.so.2: Cannot change mode to rwxrwxrwx: No such file or directory
tar: ./lib/libnsl.so.1: Cannot change mode to rwxrwxrwx: No such file or directory
tar: Exiting with failure status due to previous errors
ERROR: glibc-2.29-r0 do_package: Command 'tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package' returned non-zero exit status 2.
ERROR: glibc-2.29-r0 do_package: Function failed: perform_packagecopy
ERROR: Logfile of failure stored in: /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/temp/log.do_package.2941902
ERROR: Task (/ssd/devkit/meta/recipes-core/glibc/glibc_2.29.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 431 tasks of which 430 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/ssd/devkit/meta/recipes-core/glibc/glibc_2.29.bb:do_package
Summary: There were 3 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
It shows that the tar exit code is 2: but when I execute the command (tar -cf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image -p -S . | tar -xf - -C /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package) in shell, the exit code is 0 without errors.
It complains that some files are not found: but there are existing in both src/dst folders, as symlinks:
$ ls -la /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/image/lib
total 25836
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 .
drwxr-xr-x 7 bruin bruin 4096 Jan 28 21:16 ..
-rwxr-xr-x 1 bruin bruin 1342112 Jan 28 21:16 ld-2.29.so
lrwxrwxrwx 1 bruin bruin 10 Jan 28 21:16 ld-linux-armhf.so.3 -> ld-2.29.so
-rwxr-xr-x 1 bruin bruin 132860 Jan 28 21:16 libanl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libanl.so.1 -> libanl-2.29.so
-rwxr-xr-x 1 bruin bruin 24772 Jan 28 21:14 libBrokenLocale-2.29.so
lrwxrwxrwx 1 bruin bruin 23 Jan 28 21:14 libBrokenLocale.so.1 -> libBrokenLocale-2.29.so
-rwxr-xr-x 1 bruin bruin 16277872 Jan 28 21:16 libc-2.29.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libc.so.6 -> libc-2.29.so
-rwxr-xr-x 1 bruin bruin 223884 Jan 28 21:15 libdl-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:15 libdl.so.2 -> libdl-2.29.so
-rwxr-xr-x 1 bruin bruin 2241936 Jan 28 21:15 libm-2.29.so
-rwxr-xr-x 1 bruin bruin 83116 Jan 28 21:15 libmemusage.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libm.so.6 -> libm-2.29.so
-rwxr-xr-x 1 bruin bruin 718332 Jan 28 21:16 libnsl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libnsl.so.1 -> libnsl-2.29.so
-rwxr-xr-x 1 bruin bruin 178048 Jan 28 21:16 libnss_compat-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_compat.so.2 -> libnss_compat-2.29.so
-rwxr-xr-x 1 bruin bruin 261964 Jan 28 21:16 libnss_db-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libnss_db.so.2 -> libnss_db-2.29.so
-rwxr-xr-x 1 bruin bruin 121324 Jan 28 21:16 libnss_dns-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:16 libnss_dns.so.2 -> libnss_dns-2.29.so
-rwxr-xr-x 1 bruin bruin 371120 Jan 28 21:16 libnss_files-2.29.so
lrwxrwxrwx 1 bruin bruin 20 Jan 28 21:16 libnss_files.so.2 -> libnss_files-2.29.so
-rwxr-xr-x 1 bruin bruin 114772 Jan 28 21:16 libnss_hesiod-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_hesiod.so.2 -> libnss_hesiod-2.29.so
-rwxr-xr-x 1 bruin bruin 11888 Jan 28 21:16 libpcprofile.so
-rwxr-xr-x 1 bruin bruin 2755760 Jan 28 21:15 libpthread-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:15 libpthread.so.0 -> libpthread-2.29.so
-rwxr-xr-x 1 bruin bruin 434272 Jan 28 21:16 libresolv-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libresolv.so.2 -> libresolv-2.29.so
-rwxr-xr-x 1 bruin bruin 423408 Jan 28 21:16 librt-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:16 librt.so.1 -> librt-2.29.so
-rwxr-xr-x 1 bruin bruin 62072 Jan 28 21:16 libSegFault.so
-rwxr-xr-x 1 bruin bruin 580432 Jan 28 21:16 libthread_db-1.0.so
lrwxrwxrwx 1 bruin bruin 19 Jan 28 21:16 libthread_db.so.1 -> libthread_db-1.0.so
-rwxr-xr-x 1 bruin bruin 39564 Jan 28 21:16 libutil-2.29.so
lrwxrwxrwx 1 bruin bruin 15 Jan 28 21:16 libutil.so.1 -> libutil-2.29.so
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 systemd
$ ls -la /ssd/devkit/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/glibc/2.29-r0/package/lib
total 25836
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 .
drwxr-xr-x 7 bruin bruin 4096 Jan 28 21:16 ..
-rwxr-xr-x 1 bruin bruin 1342112 Jan 28 21:16 ld-2.29.so
lrwxrwxrwx 1 bruin bruin 10 Jan 28 21:16 ld-linux-armhf.so.3 -> ld-2.29.so
-rwxr-xr-x 1 bruin bruin 132860 Jan 28 21:16 libanl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libanl.so.1 -> libanl-2.29.so
-rwxr-xr-x 1 bruin bruin 24772 Jan 28 21:14 libBrokenLocale-2.29.so
lrwxrwxrwx 1 bruin bruin 23 Jan 28 21:14 libBrokenLocale.so.1 -> libBrokenLocale-2.29.so
-rwxr-xr-x 1 bruin bruin 16277872 Jan 28 21:16 libc-2.29.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libc.so.6 -> libc-2.29.so
-rwxr-xr-x 1 bruin bruin 223884 Jan 28 21:15 libdl-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:15 libdl.so.2 -> libdl-2.29.so
-rwxr-xr-x 1 bruin bruin 2241936 Jan 28 21:15 libm-2.29.so
-rwxr-xr-x 1 bruin bruin 83116 Jan 28 21:15 libmemusage.so
lrwxrwxrwx 1 bruin bruin 12 Jan 28 21:15 libm.so.6 -> libm-2.29.so
-rwxr-xr-x 1 bruin bruin 718332 Jan 28 21:16 libnsl-2.29.so
lrwxrwxrwx 1 bruin bruin 14 Jan 28 21:16 libnsl.so.1 -> libnsl-2.29.so
-rwxr-xr-x 1 bruin bruin 178048 Jan 28 21:16 libnss_compat-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_compat.so.2 -> libnss_compat-2.29.so
-rwxr-xr-x 1 bruin bruin 261964 Jan 28 21:16 libnss_db-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libnss_db.so.2 -> libnss_db-2.29.so
-rwxr-xr-x 1 bruin bruin 121324 Jan 28 21:16 libnss_dns-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:16 libnss_dns.so.2 -> libnss_dns-2.29.so
-rwxr-xr-x 1 bruin bruin 371120 Jan 28 21:16 libnss_files-2.29.so
lrwxrwxrwx 1 bruin bruin 20 Jan 28 21:16 libnss_files.so.2 -> libnss_files-2.29.so
-rwxr-xr-x 1 bruin bruin 114772 Jan 28 21:16 libnss_hesiod-2.29.so
lrwxrwxrwx 1 bruin bruin 21 Jan 28 21:16 libnss_hesiod.so.2 -> libnss_hesiod-2.29.so
-rwxr-xr-x 1 bruin bruin 11888 Jan 28 21:16 libpcprofile.so
-rwxr-xr-x 1 bruin bruin 2755760 Jan 28 21:15 libpthread-2.29.so
lrwxrwxrwx 1 bruin bruin 18 Jan 28 21:15 libpthread.so.0 -> libpthread-2.29.so
-rwxr-xr-x 1 bruin bruin 434272 Jan 28 21:16 libresolv-2.29.so
lrwxrwxrwx 1 bruin bruin 17 Jan 28 21:16 libresolv.so.2 -> libresolv-2.29.so
-rwxr-xr-x 1 bruin bruin 423408 Jan 28 21:16 librt-2.29.so
lrwxrwxrwx 1 bruin bruin 13 Jan 28 21:16 librt.so.1 -> librt-2.29.so
-rwxr-xr-x 1 bruin bruin 62072 Jan 28 21:16 libSegFault.so
-rwxr-xr-x 1 bruin bruin 580432 Jan 28 21:16 libthread_db-1.0.so
lrwxrwxrwx 1 bruin bruin 19 Jan 28 21:16 libthread_db.so.1 -> libthread_db-1.0.so
-rwxr-xr-x 1 bruin bruin 39564 Jan 28 21:16 libutil-2.29.so
lrwxrwxrwx 1 bruin bruin 15 Jan 28 21:16 libutil.so.1 -> libutil-2.29.so
drwxr-xr-x 3 bruin bruin 4096 Jan 28 21:16 systemd
Where should I look to for causes/solutions? Thanks!
The issues look like issues in the pseudo fakeroot emulation.
Going off https://wiki.yoctoproject.org/wiki/Releases bitbake 1.42 is based on the warrior series which in from 2019 and EOL in June 2020. It is unlikely a build that old was ever tested on a recent distro like Debian 11 that you're building on now. I'd suggest building something more recent or using an older host distro.

Search in MacMail

I am running OS X 10.11.6 and MacMail 9.3 can not search my emails.
I 'rebuilt' my mailboxes and rebuilt my SpotLight indexes.
MacMail always reports 'Zero matches for search'.
Spotlight is saving in 'Store-V2', while the 'Envelope' indexes are in 'V3'.
What could be wrong?
$ pwd
/Users/davidlaxer/Library/Mail/V3/MailData
(base) MacBook-Pro:MailData davidlaxer$ ls -lrt Env*
-rwxr-xr-x# 1 davidlaxer staff 86241280 May 10 10:31 Envelope Index
-rwxr-xr-x# 1 davidlaxer staff 32768 May 10 11:20 Envelope Index-shm
-rwxr-xr-x# 1 davidlaxer staff 1512072 May 10 11:46 Envelope Index-wal
$ sudo du -g /.Spotlight-V100/
Password:
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.assisted_import_post
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.assisted_import_pre
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.corespotlight
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.health_check
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_priority
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_system
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_user
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.migration
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.migration_secondchance
0 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.scan
14 /.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039
14 /.Spotlight-V100//Store-V2
14 /.Spotlight-V100/
sudo ls -lRt /.Spotlight-V100/
total 8
drwx------ 3 root wheel 102 May 5 08:27 Store-V2
-rw------- 1 root wheel 4001 May 5 08:27 VolumeConfiguration.plist
/.Spotlight-V100//Store-V2:
total 0
drwx------ 119 root wheel 4046 May 10 11:50 CD1CE8CA-B264-41BC-909A-ACD3AE66F039
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039:
total 28512848
-rw------- 1 root wheel 261361664 May 10 11:51 .store.db
-rw------- 1 root wheel 6554 May 10 11:51 live.4.indexGroups
-rw------- 1 root wheel 65536 May 10 11:51 live.4.indexIds
-rw------- 1 root wheel 7452 May 10 11:51 journalAttr.153
-rw------- 1 root wheel 4614377 May 10 11:50 0.indexGroups
drwx------ 3 root wheel 102 May 10 11:50 journals.health_check
-rw------- 1 root wheel 4096 May 10 11:50 0.indexHead
-rw------- 1 root wheel 4096 May 10 11:50 tmp.spotlight.state
drwx------ 3 root wheel 102 May 10 11:46 journals.assisted_import_pre
-rw------- 1 root wheel 62 May 10 11:45 live.1.indexGroups
-rw------- 1 root wheel 616 May 10 11:45 live.1.indexIds
-rw------- 1 root wheel 4096 May 10 11:45 live.1.indexHead
-rw------- 1 root wheel 33554432 May 10 11:29 0.directoryStoreFile
-rw------- 1 root wheel 4194304 May 10 11:29 live.0.directoryStoreFile
-rw------- 1 root wheel 4096 May 10 11:29 live.0.indexHead
-rw------- 1 root wheel 65536 May 10 11:29 live.1.directoryStoreFile
-rw------- 1 root wheel 1048576 May 10 11:29 live.3.directoryStoreFile
-rw------- 1 root wheel 4096 May 10 11:29 live.3.indexHead
-rw------- 1 root wheel 65536 May 10 11:29 live.4.directoryStoreFile
-rw------- 1 root wheel 33554432 May 10 11:29 reverseDirectoryStore
-rw------- 1 root wheel 4096 May 10 11:29 live.4.indexHead
-rw------- 1 root wheel 25952256 May 10 11:29 0.directoryStoreFile.shadow
-rw------- 1 root wheel 4614377 May 10 11:29 0.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 11:29 0.shadowIndexHead
-rw------- 1 root wheel 28 May 10 11:29 indexState
drwx------ 3 root wheel 102 May 10 11:29 journals.assisted_import_post
drwx------ 3 root wheel 102 May 10 11:29 journals.live_system
drwx------ 3 root wheel 102 May 10 11:29 journals.live_user
-rw------- 1 root wheel 2752512 May 10 11:29 live.0.directoryStoreFile.shadow
-rw------- 1 root wheel 1144320 May 10 11:29 live.0.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 11:29 live.0.shadowIndexHead
-rw------- 1 root wheel 5952 May 10 11:29 live.1.directoryStoreFile.shadow
-rw------- 1 root wheel 62 May 10 11:29 live.1.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 11:29 live.1.shadowIndexHead
-rw------- 1 root wheel 786432 May 10 11:29 live.3.directoryStoreFile.shadow
-rw------- 1 root wheel 45288 May 10 11:29 live.3.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 11:29 live.3.shadowIndexHead
-rw------- 1 root wheel 17664 May 10 11:29 live.4.directoryStoreFile.shadow
-rw------- 1 root wheel 0 May 10 11:29 live.4.indexUpdates
-rw------- 1 root wheel 8388608 May 10 11:29 live.4.shadowIndexArrays
-rw------- 1 root wheel 1456 May 10 11:29 live.4.shadowIndexCompactDirectory
-rw------- 1 root wheel 19532 May 10 11:29 live.4.shadowIndexDirectory
-rw------- 1 root wheel 2932 May 10 11:29 live.4.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 11:29 live.4.shadowIndexHead
-rw------- 1 root wheel 2501400 May 10 11:29 live.4.shadowIndexPositionTable
-rw------- 1 root wheel 2501400 May 10 11:29 live.4.shadowIndexTermIds
-rw------- 1 root wheel 31719424 May 10 11:29 reverseDirectoryStore.shadow
-rw------- 1 root wheel 33 May 10 11:29 reverseStore.updates
-rw------- 1 root wheel 261361664 May 10 11:29 store.db
-rw------- 1 root wheel 3 May 10 11:29 store.updates
-rw------- 1 root wheel 8388608 May 10 11:29 live.4.indexArrays
-rw------- 1 root wheel 2048 May 10 11:29 live.4.indexCompactDirectory
-rw------- 1 root wheel 32896 May 10 11:29 live.4.indexDirectory
-rw------- 1 root wheel 4194304 May 10 11:29 live.4.indexPositionTable
-rw------- 1 root wheel 16777216 May 10 11:29 live.4.indexPositions
-rw------- 1 root wheel 8388608 May 10 11:29 live.4.indexPostings
-rw------- 1 root wheel 4194304 May 10 11:29 live.4.indexTermIds
-rw-r--r-- 1 root wheel 4 May 10 11:29 shutdown_time
-rw------- 1 root wheel 1144320 May 10 11:20 live.0.indexGroups
-rw------- 1 root wheel 11443200 May 10 11:20 live.0.indexIds
-rw------- 1 root wheel 45288 May 10 10:41 live.3.indexGroups
-rw------- 1 root wheel 452880 May 10 08:54 live.3.indexIds
-rw------- 1 root wheel 19262912 May 10 08:50 live.3.indexArrays
-rw------- 1 root wheel 4022314 May 10 08:50 live.3.indexCompactDirectory
-rw------- 1 root wheel 460544 May 10 08:50 live.3.indexDirectory
-rw------- 1 root wheel 31 May 10 08:50 live.3.indexUpdates
-rw------- 1 root wheel 35174385 May 10 08:50 live.3.indexPositions
-rw------- 1 root wheel 9377717 May 10 08:50 live.3.indexPostings
-rw------- 1 root wheel 65536 May 10 08:16 live.2.directoryStoreFile
-rw------- 1 root wheel 4096 May 10 08:16 live.2.indexHead
-rw------- 1 root wheel 1792 May 10 08:16 live.2.directoryStoreFile.shadow
-rw------- 1 root wheel 4 May 10 08:16 live.2.shadowIndexGroups
-rw------- 1 root wheel 4096 May 10 08:16 live.2.shadowIndexHead
-rw------- 1 root wheel 5937408 May 10 08:16 live.1.indexArrays
-rw------- 1 root wheel 732628 May 10 08:16 live.1.indexCompactDirectory
-rw------- 1 root wheel 722684 May 10 08:16 live.1.indexDirectory
-rw------- 1 root wheel 17 May 10 08:16 live.1.indexUpdates
-rw------- 1 root wheel 1332150 May 10 08:16 live.1.indexPositions
-rw------- 1 root wheel 381040 May 10 08:16 live.1.indexPostings
-rw------- 1 root wheel 3277 May 10 08:16 live.2.indexGroups
-rw------- 1 root wheel 2112 May 10 08:15 live.2.indexArrays
-rw------- 1 root wheel 8 May 10 08:15 live.2.indexCompactDirectory
-rw------- 1 root wheel 2056 May 10 08:15 live.2.indexDirectory
-rw------- 1 root wheel 32 May 10 08:15 live.2.indexIds
-rw------- 1 root wheel 704 May 10 08:15 live.2.indexPositionTable
-rw------- 1 root wheel 704 May 10 08:15 live.2.indexTermIds
-rw------- 1 root wheel 4096 May 10 08:15 live.2.indexPostings
-rw------- 1 root wheel 13 May 10 08:15 live.2.indexUpdates
-rw------- 1 root wheel 4096 May 10 08:15 live.2.indexPositions
-rw------- 1 root wheel 116111616 May 10 06:55 live.0.indexArrays
-rw------- 1 root wheel 16341676 May 10 06:55 live.0.indexCompactDirectory
-rw------- 1 root wheel 7297772 May 10 06:55 live.0.indexDirectory
-rw------- 1 root wheel 125 May 10 06:55 live.0.indexUpdates
-rw------- 1 root wheel 233745118 May 10 06:55 live.0.indexPositions
-rw------- 1 root wheel 92373248 May 10 06:55 live.0.indexPostings
-rw------- 1 root wheel 46143768 May 9 17:44 0.indexIds
drwx------ 3 root wheel 102 May 8 15:29 journals.live_priority
-rw------- 1 root wheel 814959 May 8 15:29 tmp.spotlight.loc
-rw------- 1 root wheel 1863674176 May 7 15:28 0.indexArrays
-rw------- 1 root wheel 421591410 May 7 15:28 0.indexCompactDirectory
-rw------- 1 root wheel 32731520 May 7 15:28 0.indexDirectory
-rw------- 1 root wheel 1815 May 7 15:28 0.indexUpdates
-rw------- 1 root wheel 9492016397 May 7 15:21 0.indexPositions
-rw------- 1 root wheel 1462613059 May 7 15:21 0.indexPostings
drwx------ 3 root wheel 102 May 7 14:10 journals.scan
-rw------- 1 root wheel 0 May 5 08:27 Cab.created
-rw------- 1 root wheel 0 May 5 08:27 Lion.created
-rw------- 1 root wheel 0 May 5 08:27 journalAttr.1
-rw------- 1 root wheel 0 May 5 08:27 journalExclusion
drwx------ 2 root wheel 68 May 5 08:27 journals.corespotlight
drwx------ 2 root wheel 68 May 5 08:27 journals.live
drwx------ 2 root wheel 68 May 5 08:27 journals.migration
drwx------ 2 root wheel 68 May 5 08:27 journals.migration_secondchance
-rw-r--r-- 1 root wheel 4 May 5 08:27 store_generation
-rw------- 1 root wheel 0 May 5 08:27 tmp.Cab
-rw------- 1 root wheel 0 May 5 08:27 tmp.Lion
-rw------- 1 root wheel 0 May 5 08:27 tmp.SnowLeopard
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.health_check:
total 0
-rw------- 1 root wheel 0 May 10 11:50 retire.10586
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.assisted_import_pre:
total 0
-rw------- 1 root wheel 0 May 10 11:46 retire.155623
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.assisted_import_post:
total 0
-rw------- 1 root wheel 0 May 10 11:29 retire.372
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_system:
total 0
-rw------- 1 root wheel 0 May 10 11:29 retire.359623
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_user:
total 0
-rw------- 1 root wheel 0 May 10 11:29 retire.970891
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live_priority:
total 0
-rw------- 1 root wheel 0 May 8 15:29 retire.272870
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.scan:
total 0
-rw------- 1 root wheel 0 May 7 14:10 retire.5816751
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.corespotlight:
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.live:
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.migration:
/.Spotlight-V100//Store-V2/CD1CE8CA-B264-41BC-909A-ACD3AE66F039/journals.migration_secondchance:
The directory ~/Library/Metadata/CoreSpotlight/ was missing.
/private/var/folders had directories owned by a non-existent user.
Clearly, the disk cloning had issues.
The solution was to do a clean reinstall the OS and use the migration assistant.

How to install PGlogical from sources on Freebsd?

I have Postgresql 9.5 server on Freebsd. I try to install PGlogical (http://2ndquadrant.com/en/resources/pglogical/) from sources. But when I downloaded tarball and unpacked it, I saw only these files:
pglogical-1.0.1 ls -la
total 480
drwxr-xr-x 6 root wheel 1536 Mar 24 11:51 .
drwxrwxrwt 16 root wheel 1024 Mar 24 15:42 ..
-rw-rw-r-- 1 1000 1000 8 Jan 19 15:39 .distgitrev
-rw-rw-r-- 1 1000 1000 11 Jan 19 15:39 .distgittag
-rw-rw-r-- 1 1000 1000 169 Dec 31 12:33 .gitignore
-rw-rw-r-- 1 1000 1000 216 Dec 27 15:59 .gitmodules
-rw-rw-r-- 1 1000 1000 6240 Jan 18 06:42 Makefile
-rw-rw-r-- 1 1000 1000 23965 Jan 18 06:42 README.md
drwxrwxr-x 4 1000 1000 512 Jan 18 06:42 compat
drwxrwxr-x 2 1000 1000 512 Jan 19 14:39 expected
-rw-rw-r-- 1 1000 1000 893 Jan 19 14:39 pglogical--1.0.0--1.0.1.sql
-rw-rw-r-- 1 1000 1000 9496 Jan 18 06:42 pglogical--1.0.0.sql
-rw-rw-r-- 1 1000 1000 9504 Jan 18 06:42 pglogical--1.0.1.sql
-rw-rw-r-- 1 1000 1000 12670 Jan 18 06:42 pglogical.c
-rw-rw-r-- 1 1000 1000 184 Dec 22 15:27 pglogical.control.in
-rw-rw-r-- 1 1000 1000 1796 Jan 18 06:42 pglogical.h
-rw-rw-r-- 1 1000 1000 43489 Jan 18 06:42 pglogical_apply.c
-rw-rw-r-- 1 1000 1000 13960 Jan 18 06:42 pglogical_conflict.c
-rw-rw-r-- 1 1000 1000 2038 Dec 19 13:27 pglogical_conflict.h
-rw-rw-r-- 1 1000 1000 38525 Jan 18 06:42 pglogical_create_subscriber.c
drwxrwxr-x 2 1000 1000 1024 Jan 18 07:32 pglogical_dump
-rw-rw-r-- 1 1000 1000 1367 Dec 19 13:27 pglogical_fe.c
-rw-rw-r-- 1 1000 1000 533 Dec 1 09:35 pglogical_fe.h
-rw-rw-r-- 1 1000 1000 41913 Jan 18 06:42 pglogical_functions.c
-rw-rw-r-- 1 1000 1000 8748 Dec 19 13:27 pglogical_hooks.c
-rw-rw-r-- 1 1000 1000 4126 Dec 19 13:27 pglogical_manager.c
-rw-rw-r-- 1 1000 1000 23212 Jan 18 06:42 pglogical_node.c
-rw-rw-r-- 1 1000 1000 1992 Dec 19 13:27 pglogical_node.h
-rw-rw-r-- 1 1000 1000 9323 Dec 19 13:27 pglogical_proto.c
-rw-rw-r-- 1 1000 1000 1431 Sep 30 07:51 pglogical_proto.h
-rw-rw-r-- 1 1000 1000 5493 Dec 19 13:27 pglogical_queue.c
-rw-rw-r-- 1 1000 1000 1026 Dec 19 13:27 pglogical_queue.h
-rw-rw-r-- 1 1000 1000 4832 Jan 18 06:42 pglogical_relcache.c
-rw-rw-r-- 1 1000 1000 1147 Dec 19 13:27 pglogical_relcache.h
-rw-rw-r-- 1 1000 1000 24719 Dec 19 13:27 pglogical_repset.c
-rw-rw-r-- 1 1000 1000 2770 Jan 18 06:42 pglogical_repset.h
-rw-rw-r-- 1 1000 1000 4126 Dec 19 13:27 pglogical_rpc.c
-rw-rw-r-- 1 1000 1000 711 Dec 1 09:35 pglogical_rpc.h
-rw-rw-r-- 1 1000 1000 34577 Jan 18 06:42 pglogical_sync.c
-rw-rw-r-- 1 1000 1000 2472 Dec 19 13:27 pglogical_sync.h
-rw-rw-r-- 1 1000 1000 9808 Jan 18 06:42 pglogical_worker.c
-rw-rw-r-- 1 1000 1000 2898 Dec 19 13:27 pglogical_worker.h
-rw-rw-r-- 1 1000 1000 4667 Oct 28 08:21 regress-pg_hba.conf
-rw-rw-r-- 1 1000 1000 602 Jan 18 06:42 regress-postgresql.conf
drwxrwxr-x 2 1000 1000 512 Jan 19 14:39 sql
And I didn't see configure file and other. How to install this tarball? OS - Freebsd 10.2
You can install pglogical from sources only using PostgreSQL sources:
Download sources of PostgreSQL of necessary version.
You also need pglogical_output extension and its sources. You can read about it in the documentation. Download it from GitHub.
Configure PostgreSQL. More about it in the documentation.
Copy downloaded sources of pglogical and pglogical_output to directories contrib/pglogical and contrib/pglogical_output.
Execute commands:
cd <path-to-postgres-sources>/contrib/pglogical
make install
cd <path-to-postgres-sources>/contrib/pglogical_output
make install
Read the documentation to setup pglogical.
Did you read the README file? It will probably tell you to use make, as there is a Makefile

Insert newline in html format using Powershell

I have the string value that has
. I want replace this with \n. and when I convert it to html format after each line comes to another line. But this not work.
$StdOut = 'total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0
Jun 16 14:55 cim.socket
drwxr-xr-x 2 root root 4096 Jun 16 17:58 localauth
-rw------- 1 root root 6 Jun 16 14:55 scx-cimd.pid
'
$CResult = $StdOut -replace "
", "\n"
After using Convert-html I have the text like this :
'total 40\ndrwxr-xr-x 3 root root 4096 Jun 16 14:55 .\ndrwxr-xr-x 5 root root 4096 Jun 16 14:54 ..\n-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock\nsrwxrwxrwx 1 root root 0 Jun 16 14:55
cim.socket\ndrwxr-xr-x 2 root root 4096 Jun 16 17:58 localauth\n-rw------- 1 root root 6 Jun 16 14:55 scx-cimd.pid\n
'
How can I do this?
The approach Mathias mentions works fine for newlines. But if you have (or could have) other entity refs then I would use the HtmlDecode method e.g.
Add-Assembly System.Web
[System.Web.HttpUtility]::HtmlDecode($StdOut)
Outputs:
total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0
PS C:\WINDOWS\system32> Add-Assembly System.Web
Add-Assembly : The term 'Add-Assembly' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of
the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Add-Assembly System.Web
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-Assembly:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Try this
$null = [Reflection.Assembly]::LoadWithPartialName('System.Web')
[System.Web.HttpUtility]::HtmlDecode($StdOut)
Gives me
total 40
drwxr-xr-x 3 root root 4096 Jun 16 14:55 .
drwxr-xr-x 5 root root 4096 Jun 16 14:54 ..
-rw------- 1 root root 0 Jun 16 14:55 cimserver_start.lock
srwxrwxrwx 1 root root 0