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.
Related
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.
Suppose the following linker script is used to layout an executable file.
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
OUTPUT_FORMAT(ELF)
My questions are:
I think such layout info must be stored in the output ELF file so the loader can load the executable based on that info. Right?
If 1 is true, how to view such layout info in a ELF? objdump?
I think such layout info must be stored in the output ELF file so the loader can load the executable based on that info. Right?
ELF stands for executable and linking format.
The .text, .data etc. are part of the linking format. While they usually are present in the fully-linked binary, they can be stripped.
The info that the loader needs to load the executable is stored as a table of segments (Elf{36,64}_Phdr[]).
If 1 is true, how to view such layout info in a ELF? objdump?
You can examine segments (and, if the optional section table is present, the mapping of sections to segments) with readelf -Wl a.out.
You can deduce the information from the linker command script by taking a look at the output of the -S option in readelf.
$ readelf -S $(which ls)
There are 28 section headers, starting at offset 0x1f6f8:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 0000000000400238 00000238
000000000000001c 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 0000000000400254 00000254
0000000000000020 0000000000000000 A 0 0 4
[ 3] .note.gnu.build-i NOTE 0000000000400274 00000274
0000000000000024 0000000000000000 A 0 0 4
[ 4] .gnu.hash GNU_HASH 0000000000400298 00000298
0000000000000104 0000000000000000 A 5 0 8
[ 5] .dynsym DYNSYM 00000000004003a0 000003a0
0000000000000c48 0000000000000018 A 6 1 8
[ 6] .dynstr STRTAB 0000000000400fe8 00000fe8
0000000000000582 0000000000000000 A 0 0 1
[ 7] .gnu.version VERSYM 000000000040156a 0000156a
...
If you want to know where this comes from, take a look at the default linker command scripts for your toolchain; this default is used if you did not explicitly create your own. I think there may be some inheritance between them as well, but I can't say for certain.
$ ls -l /usr/lib/ldscripts/ | grep elf
-rw-r--r-- 1 root root 9027 Mar 22 04:05 elf32_x86_64.x
-rw-r--r-- 1 root root 8880 Mar 22 04:05 elf32_x86_64.xbn
-rw-r--r-- 1 root root 8706 Mar 22 04:05 elf32_x86_64.xc
-rw-r--r-- 1 root root 9024 Mar 22 04:05 elf32_x86_64.xd
-rw-r--r-- 1 root root 8720 Mar 22 04:05 elf32_x86_64.xdc
-rw-r--r-- 1 root root 8680 Mar 22 04:05 elf32_x86_64.xdw
-rw-r--r-- 1 root root 9027 Mar 22 04:05 elf32_x86_64.xn
-rw-r--r-- 1 root root 5443 Mar 22 04:05 elf32_x86_64.xr
-rw-r--r-- 1 root root 8551 Mar 22 04:05 elf32_x86_64.xs
-rw-r--r-- 1 root root 8247 Mar 22 04:05 elf32_x86_64.xsc
-rw-r--r-- 1 root root 8207 Mar 22 04:05 elf32_x86_64.xsw
-rw-r--r-- 1 root root 5489 Mar 22 04:05 elf32_x86_64.xu
-rw-r--r-- 1 root root 8666 Mar 22 04:05 elf32_x86_64.xw
-rw-r--r-- 1 root root 8396 Mar 22 04:05 elf_i386.x
-rw-r--r-- 1 root root 8249 Mar 22 04:05 elf_i386.xbn
-rw-r--r-- 1 root root 8209 Mar 22 04:05 elf_i386.xc
-rw-r--r-- 1 root root 8389 Mar 22 04:05 elf_i386.xd
-rw-r--r-- 1 root root 8219 Mar 22 04:05 elf_i386.xdc
...
I searched a bit and found something.
For 1. According ELF format on wikipedia, there are program headers that record the address layout info.
For 2. readelf is a promising tool.
How do I read from these sensors? I just found their location, but the folder appears to contain softlinks to another location. My goal is to monitor the gyroscope.
$ ls /sys/bus/iio/devices/iio:device*
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200073.1.auto/iio:device0
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200076.2.auto/iio:device1
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device2 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200083.3.auto/iio:device2
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device3 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200086.4.auto/iio:device3
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device4 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-20008a.5.auto/iio:device4
lrwxrwxrwx 1 root root 0 Jan 31 23:18 /sys/bus/iio/devices/iio:device5 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200041.6.auto/iio:device5
Using cat:
$ cat /sys/bus/iio/devices/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0483:91D1.0018/HID-SENSOR-200073.1.auto/iio:device0
Here is a nice presentation on IIO subsystem.
I have the Casbah MongoDB driver that I use in my Web Application and when I tried to connect to the Database which is when the Casbah driver API's are called, I face a strange error:
play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.IncompatibleClassChangeError: Class com.mongodb.casbah.Imports$ does not implement the requested interface com.mongodb.casbah.query.dsl.SearchOp]]
at play.api.Application$class.handleError(Application.scala:293) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.DefaultApplication.handleError(Application.scala:399) [com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165) [com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162) [com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.util.Try$.apply(Try.scala:161) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.util.Failure.recover(Try.scala:185) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:387) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:387) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) [org.scala-lang.scala-library-2.10.2.jar:na]
at play.api.libs.iteratee.Execution$$anon$1.execute(Execution.scala:43) [com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:37) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:133) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Promise$class.complete(Promise.scala:55) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:58) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$flatMap$1$$anonfun$apply$3.apply(Future.scala:278) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$flatMap$1$$anonfun$apply$3.apply(Future.scala:278) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.processBatch$1(Future.scala:731) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply$mcV$sp(Future.scala:746) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:723) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:723) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$Batch.run(Future.scala:722) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$.scala$concurrent$Future$InternalCallbackExecutor$$unbatchedExecute(Future.scala:782) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:773) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:37) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:133) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Promise$class.complete(Promise.scala:55) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:58) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:274) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:274) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) [org.scala-lang.scala-library-2.10.2.jar:na]
at play.api.libs.iteratee.Execution$$anon$2.execute(Execution.scala:70) [com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:37) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:133) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.Promise$class.complete(Promise.scala:55) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:58) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:23) [org.scala-lang.scala-library-2.10.2.jar:na]
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42) [com.typesafe.akka.akka-actor_2.10-2.2.0.jar:2.2.0]
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) [com.typesafe.akka.akka-actor_2.10-2.2.0.jar:2.2.0]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [org.scala-lang.scala-library-2.10.2.jar:na]
Caused by: java.lang.RuntimeException: java.lang.IncompatibleClassChangeError: Class com.mongodb.casbah.Imports$ does not implement the requested interface com.mongodb.casbah.query.dsl.SearchOp
at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:314) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:109) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:109) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.utils.Threads$.withContextClassLoader(Threads.scala:18) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:108) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:107) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at scala.Option.map(Option.scala:145) ~[org.scala-lang.scala-library-2.10.2.jar:na]
at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:107) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:100) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:481) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:481) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:517) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:517) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:493) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:493) ~[com.typesafe.play.play-iteratees_2.10-2.2.1.jar:2.2.1]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) [org.scala-lang.scala-library-2.10.2.jar:na]
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) [org.scala-lang.scala-library-2.10.2.jar:na]
... 6 common frames omitted
Caused by: java.lang.IncompatibleClassChangeError: Class com.mongodb.casbah.Imports$ does not implement the requested interface com.mongodb.casbah.query.dsl.SearchOp
at com.mongodb.casbah.query.dsl.SearchOp$class.$init$(BarewordOperators.scala:405) ~[casbah-query_2.10-2.7.0-RC2.jar:2.6.2]
at com.mongodb.casbah.Imports$.<init>(Implicits.scala:142) ~[casbah-core_2.10-2.7.0-RC2.jar:2.7.0-RC2]
at com.mongodb.casbah.Imports$.<clinit>(Implicits.scala) ~[casbah-core_2.10-2.7.0-RC2.jar:2.7.0-RC2]
at com.q31.scerticles.core.domain.content.Exam$.getAllExamsForTechnologyWithPagination(Exam.scala:59) ~[scerticles-core-1.0-SNAPSHOT.jar:na]
at com.q31.scerticles.core.service.ContentService.allExamsForTechnologyWithPagination(ContentService.scala:46) ~[scerticles-core-1.0-SNAPSHOT.jar:na]
at controllers.content.ExamController$$anonfun$allExamsForTechnology$1.apply(ExamController.scala:37) ~[com-q31-scerticles.com-q31-scerticles-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at controllers.content.ExamController$$anonfun$allExamsForTechnology$1.apply(ExamController.scala:35) ~[com-q31-scerticles.com-q31-scerticles-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:221) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.ActionBuilder$$anonfun$apply$10.apply(Action.scala:220) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.Action$.invokeBlock(Action.scala:357) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:309) ~[com.typesafe.play.play_2.10-2.2.1.jar:2.2.1]
... 22 common frames omitted
Looks like there seems to be some sort of library incompatibility, but just don't know which one. Any clues? Here are my libraries so far!
-rw-r--r-- 1 root root 4467 Jun 14 09:09 aopalliance-1.0.jar
-rw-r--r-- 1 root root 167386 Jun 14 09:09 casbah-commons_2.10-2.7.0-RC2.jar
-rw-r--r-- 1 root root 286110 Jun 14 09:09 casbah-core_2.10-2.7.0-RC2.jar
-rw-r--r-- 1 root root 79191 Jun 14 09:09 casbah-gridfs_2.10-2.7.0-RC2.jar
-rw-r--r-- 1 root root 223987 Jun 14 09:09 casbah-query_2.10-2.7.0-RC2.jar
-rw-r--r-- 1 root root 264600 Jun 14 09:09 ch.qos.logback.logback-classic-1.0.13.jar
-rw-r--r-- 1 root root 418870 Jun 14 09:09 ch.qos.logback.logback-core-1.0.13.jar
-rw-r--r-- 1 root root 33491 Jun 14 09:09 com.fasterxml.jackson.core.jackson-annotations-2.2.2.jar
-rw-r--r-- 1 root root 191738 Jun 14 09:09 com.fasterxml.jackson.core.jackson-core-2.2.2.jar
-rw-r--r-- 1 root root 866104 Jun 14 09:09 com.fasterxml.jackson.core.jackson-databind-2.2.2.jar
-rw-r--r-- 1 root root 117309 Jun 14 09:09 com.github.nscala-time.nscala-time_2.10-0.2.0.jar
-rw-r--r-- 1 root root 1295513 Jun 14 09:09 com.github.scala-incubator.io.scala-io-core_2.10-0.4.2.jar
-rw-r--r-- 1 root root 437576 Jun 14 09:09 com.github.scala-incubator.io.scala-io-file_2.10-0.4.2.jar
-rw-r--r-- 1 root root 2189117 Jun 14 09:09 com.google.guava.guava-14.0.1.jar
-rw-r--r-- 1 root root 1549098 Jun 14 09:09 com.h2database.h2-1.3.172.jar
-rw-r--r-- 1 root root 110600 Jun 14 09:09 com.jolbox.bonecp-0.8.0.RELEASE.jar
-rw-r--r-- 1 root root 75459 Jun 14 09:09 com.jsuereth.scala-arm_2.10-1.3.jar
-rw-r--r-- 1 root root 46725 Jun 14 09:09 commons-codec.commons-codec-1.3.jar
-rw-r--r-- 1 root root 60686 Jun 14 09:09 commons-logging.commons-logging-1.1.1.jar
-rw-r--r-- 1 root root 500511 Jun 14 09:09 com.ning.async-http-client-1.7.18.jar
-rw-r--r-- 1 root root 30190 Jun 14 09:09 com.thoughtworks.paranamer.paranamer-2.5.2.jar
-rw-r--r-- 1 root root 2643414 Jun 14 09:09 com.typesafe.akka.akka-actor_2.10-2.2.0.jar
-rw-r--r-- 1 root root 14477 Jun 14 09:09 com.typesafe.akka.akka-slf4j_2.10-2.2.0.jar
-rw-r--r-- 1 root root 187497 Jun 14 09:09 com.typesafe.config-1.0.2.jar
-rw-r--r-- 1 root root 7012 Jun 14 09:09 com.typesafe.netty.netty-http-pipelining-1.1.2.jar
-rw-r--r-- 1 root root 294444 Jun 14 09:09 com.typesafe.play.anorm_2.10-2.2.1.jar
-rw-r--r-- 1 root root 3774943 Jun 14 09:09 com.typesafe.play.play_2.10-2.2.1.jar
-rw-r--r-- 1 root root 35156 Jun 14 09:09 com.typesafe.play.play-cache_2.10-2.2.1.jar
-rw-r--r-- 1 root root 5198 Jun 14 09:09 com.typesafe.play.play-datacommons_2.10-2.2.1.jar
-rw-r--r-- 1 root root 4571 Jun 14 09:09 com.typesafe.play.play-exceptions-2.2.1.jar
-rw-r--r-- 1 root root 366840 Jun 14 09:09 com.typesafe.play.play-functional_2.10-2.2.1.jar
-rw-r--r-- 1 root root 716463 Jun 14 09:09 com.typesafe.play.play-iteratees_2.10-2.2.1.jar
-rw-r--r-- 1 root root 201709 Jun 14 09:09 com.typesafe.play.play-jdbc_2.10-2.2.1.jar
-rw-r--r-- 1 root root 627243 Jun 14 09:09 com.typesafe.play.play-json_2.10-2.2.1.jar
-rw-r--r-- 1 root root 8759 Jun 14 09:09 com.typesafe.play.sbt-link-2.2.1.jar
-rw-r--r-- 1 root root 39142 Jun 14 09:09 com.typesafe.play.templates_2.10-2.2.1.jar
-rw-r--r-- 1 root root 187497 Jun 14 09:09 config-1.0.2.jar
-rw-r--r-- 1 root root 710492 Jun 14 09:09 guice-3.0.jar
-rw-r--r-- 1 root root 1208356 Jun 14 09:09 io.netty.netty-3.7.0.Final.jar
-rw-r--r-- 1 root root 2497 Jun 14 09:09 javax.inject-1.jar
-rw-r--r-- 1 root root 15071 Jun 14 09:09 javax.transaction.jta-1.1.jar
-rw-r--r-- 1 root root 40544 Jun 14 09:09 joda-convert-1.3.1.jar
-rw-r--r-- 1 root root 581571 Jun 14 09:09 joda-time-2.3.jar
-rw-r--r-- 1 root root 581571 Jun 14 09:09 joda-time.joda-time-2.3.jar
-rw-r--r-- 1 root root 586498 Jun 14 09:09 mongo-java-driver-2.12.0-rc2.jar
-rw-r--r-- 1 root root 1346296 Jun 14 09:09 net.sf.ehcache.ehcache-core-2.6.6.jar
-rw-r--r-- 1 root root 183875 Jun 14 09:09 nscala-time_2.10-0.6.0.jar
-rw-r--r-- 1 root root 6512 Jun 14 09:09 oauth.signpost.signpost-commonshttp4-1.2.1.2.jar
-rw-r--r-- 1 root root 45277 Jun 14 09:09 oauth.signpost.signpost-core-1.2.1.2.jar
-rw-r--r-- 1 root root 315805 Jun 14 09:09 org.apache.commons.commons-lang3-3.1.jar
-rw-r--r-- 1 root root 291037 Jun 14 09:09 org.apache.httpcomponents.httpclient-4.0.1.jar
-rw-r--r-- 1 root root 172888 Jun 14 09:09 org.apache.httpcomponents.httpcore-4.0.1.jar
-rw-r--r-- 1 root root 713930 Jun 14 09:09 org.javassist.javassist-3.18.0-GA.jar
-rw-r--r-- 1 root root 40544 Jun 14 09:09 org.joda.joda-convert-1.3.1.jar
-rw-r--r-- 1 root root 86503 Jun 14 09:09 org.json4s.json4s-ast_2.10-3.1.0.jar
-rw-r--r-- 1 root root 462450 Jun 14 09:09 org.json4s.json4s-core_2.10-3.1.0.jar
-rw-r--r-- 1 root root 63432 Jun 14 09:09 org.json4s.json4s-native_2.10-3.1.0.jar
-rw-r--r-- 1 root root 14411577 Jun 14 09:09 org.scala-lang.scala-compiler-2.10.2.jar
-rw-r--r-- 1 root root 7121818 Jun 14 09:09 org.scala-lang.scala-library-2.10.2.jar
-rw-r--r-- 1 root root 854338 Jun 14 09:09 org.scala-lang.scalap-2.10.2.jar
-rw-r--r-- 1 root root 3171168 Jun 14 09:09 org.scala-lang.scala-reflect-2.10.2.jar
-rw-r--r-- 1 root root 650514 Jun 14 09:09 org.scala-stm.scala-stm_2.10-0.7.jar
-rw-r--r-- 1 root root 16517 Jun 14 09:09 org.slf4j.jcl-over-slf4j-1.7.5.jar
-rw-r--r-- 1 root root 4960 Jun 14 09:09 org.slf4j.jul-to-slf4j-1.7.5.jar
-rw-r--r-- 1 root root 26084 Jun 14 09:09 org.slf4j.slf4j-api-1.7.5.jar
-rw-r--r-- 1 root root 7126003 Jun 14 09:09 scala-library-2.10.3.jar
-rw-r--r-- 1 root root 3171168 Jun 14 09:09 scala-reflect-2.10.2.jar
-rw-r--r-- 1 root root 7195811 Jun 14 09:09 scalatest_2.10-2.1.0.jar
-rw-r--r-- 1 root root 26084 Jun 14 09:09 slf4j-api-1.7.5.jar
-rw-r--r-- 1 root root 201315 Jun 14 09:09 tyrex.tyrex-1.0.1.jar
-rw-r--r-- 1 root root 1367760 Jun 14 09:09 xerces.xercesImpl-2.11.0.jar
-rw-r--r-- 1 root root 220536 Jun 14 09:09 xml-apis.xml-apis-1.4.01.jar
use casbah 2.8.1 version which could solve your problem.
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/.