I'm trying to use zipnote to rename files in an zip archive but I can't figure out how to use it properly. There's already a similar question but it doesn't work for some reason.
When I try to use:
printf "# myfile.txt\n#=myfile2.txt\n" | zipnote -w archive.zip
I just says:
zipnote error: Bad file descriptor
zipnote error: Temporary file failure (ziMZslgn)
This throws exactly the same error message which is weird to me:
zipnote test.zip > a.txt
zipnote -w test.zip < a.txt
I'm running OS X 10.9 but the manual page doesn't mention any difference to the standard linux zipnote.
edit: On Debian 6.0 it returns:
zipnote error: Bad file descriptor
*** Error in `zipnote': free(): corrupted unsorted chunks: 0x0000000000d962e0 ***
zipnote error: Temporary file failure (ziw8B942)
*** Error in `zipnote': double free or corruption (!prev): 0x0000000000d962e0 ***
This has been fixed in zip 3.1 beta
Related
I'm trying the following:
use pseudo to pack an archive (bz2) which has files with security xattr set.
use pseudo again to unpack the archive and keep the security xattr of the files.
Unfortunately, the extraction fails with the following message coming from pseudo:
$ pseudo tar -cjpf myarchive.tar.bz2 --xattrs --xattrs-include='*' myFile
# checked the contents in the meantime and looked good
$ pseudo tar -C unpack-folder/ -xpjf myarchive.tar.bz2 --xattrs --xattrs-include='*'
Warning: PSEUDO_PREFIX unset, defaulting to /home/user/tmp/.
got *at() syscall for unknown directory, fd 4
unknown base path for fd 4, path myFile
couldn't allocate absolute path for 'myFile'.
tar: myFile: Cannot open: Bad address
tar: Exiting with failure status due to previous errors
pseudo: 1.9.0
tar: 1.34
Do you have any idea what could be the problem or have another idea on how to be able to preserve the xattr of the files when extracting the contents of the archive?
I have problem with long file name using rsync (version 3.0.4 protocol version 30) in cygwin (on Windows 8.1)
Rsync give me error: "some file name" failed: File name too long (91)
In detail
command:
rsync -r -t -v --modify-window=1 --log-file="E:\!SAFE\SYSTEM\SKRIPTE\log_detaljni_wamp.txt" /cygdrive/c/wamp/ /cygdrive/j/Lenovo/C/wamp >> E:\!SAFE\SYSTEM\SKRIPTE\log.txt
error:
2016/09/20 11:59:34 [9140] rsync: mkstemp "/cygdrive/j/Lenovo/C/wamp/www/wiki/images/thumb/2015-05-22_14_20_42-How_to_fix_the_there_was_a_problem_sending_the_command_to_the_program_Excel_er.png/.120px-2015-05-22_14_20_42-How_to_fix_the_there_was_a_problem_sending_the_command_to_the_program_Excel_er.png.XgcKIu" failed: File name too long (91)
Window has a maximum length for the whole file path.
It's not just an rsync problem: https://support.microsoft.com/en-gb/kb/2891362 (I believe the "fix" listed on that page is for the Windows Explorer mis-behaviour, not a solution to the underlying limitation).
When I run :make in vim, and if I have an error in my one and only cpp file (main.cpp) vim shows me the errors and when I press enter it opens a file named
^[[H^[[Jmain.cpp
instead of
main.cpp
And I have to manually reopen my file. Any idea how to tell vim to open the right file?
I'm running
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 20 2016 11:17:28)
MacOS X (unix) version
Included patches: 1-1655 Compiled by Homebrew
Error output:
main.cpp:40:2: error: unknown type name 'obvious'
obvious error
^
main.cpp:40:15: error: expected ';' at end of declaration
obvious error
^
;
2 errors generated.
rm: main: No such file or directory
make: *** [all] Error 1
Press ENTER or type command to continue
vim errorformat (as reported by :echo &errorformat)
%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]:Entering directory %*[`']%f',
%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
Makefile looked something like this:
all:
clear && g++ main.cpp -o main
And the clear seems to be throwing it off. Workaround is to remove the clear or add an echo after
all:
g++ main.cpp -o main
all2:
clear && echo "" && g++ main.cpp -o main
I have transferred large tarz ~17Gb using gnu split in windows with 2048mb parts,
After uploading to Linux (Redhat 5 32bit) and combining the files using cat (cat xaa xab xac ... >> final.tarz), there is an error during checking tar xvfz final.tarz.
gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
The file size are ditto and also the md5 checksum. So no clue what went wrong.
Can I resume tar from another part or skip the bad part, or may be check if the files are correctly transferred and re-transfer bad files only.
I started sicstus from my Cygwin prompt on my Windows7 64bit installation, and created a prolog program. Then I saved it using the following command that created the file "test.sav" in my current folder.
save_program(test).
When I try to run this file, I get a cryptic error message:
$ ./test.sav
! Existence error in argument 1 of restore/1
! file '%0.bat' does not exist
! goal: restore('%0.bat')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar 7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.
./test.sav: line 2: $'\032\r': command not found
./test.sav: line 8: x??xU?u/:?HBa?m[F?????ld?l???l?????./test.sav: line 9: syntax error near unexpected token `)'
./test.sav: line 9: `}?????????8?h????)}???C?qa? ??.?????????/F??7W???yE?lL}>}L???????"???o%"?aac|S[G?????"W????'??K?1Q???????H??M?4??=???bE?
???t[<??????I??\)T?*????????N+?4??#h? ?'?{?1J?*????F?Q??q?<B?5#????l?(s?x?`r?????b?5??%:#I?Eb?#????1-???|a????? ?D??G?)??O?
When I look at the head of the file, this is what I get:
$ head ./test.sav
sicstus-4.2.0 -r %0.bat -a %1 %2 %3 %4 %5 %6 %7 %8 %9
# META_INFO 1
# FILE: "c:/eclipse/workspace_prolog/busstuc/test.sav"
# FR: "timeout"
# META_INFO END
version=4 archmask=0x2c81a
x??xU?u/:?HBa?m[F?????ld?l???l?????head: write error: Permission denied
head: write error
I also tried loading the file in a different manner:
$ sicstus -l ./test.sav
% loading c:/eclipse/workspace_prolog/busstuc/test.sav...
% c:/eclipse/workspace_prolog/busstuc/test.sav loaded, 0 msec 104 bytes
! Consistency error: memory and saved_state are inconsistent
! type 32-bit,BDD,GAUGE,ALL_BUT_PROLOG, saved state, type 32-bit,BDD,GAUGE, emulator
! goal: ensure_loaded(user:'./test.sav')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar 7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.
Can someone please explain to me why this is not working?
Am I doing something wrong here?
Thanks!
EDIT: I changed the filename from test.sav to test.bat following Per's suggestion. This happens:
C:\eclipse\workspace_prolog\BussTUC>sicstus-4.2.0 -r C:\eclipse\workspace_prolog\BussTUC\test.bat.bat -a
! Existence error in argument 1 of restore/1
! file 'C:\\eclipse\\workspace_prolog\\BussTUC\\test.bat.bat' does not exist
! goal: restore('C:\\eclipse\\workspace_prolog\\BussTUC\\test.bat.bat')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar 7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.
C:\eclipse\workspace_prolog\BussTUC># META_INFO 1
'#' is not recognized as an internal or external command,
operable program or batch file.
C:\eclipse\workspace_prolog\BussTUC>The system cannot write to the specified device.
The system cannot write to the specified device.
| The system cannot write to the specified device.
This, undocumented and unsupported, feature apparently never did work on Windows.
Instead you can use one of the pre-built runtime systems that loads a main.sav from the folder containing the executable. E.g. save your test.sav as main.sav instead and place it alongside sprti.exe in a folder that contains a proper folder structure for SICStus, as described in the manual, in the section Runtime Systems on Windows Target Machines.
The most common solution is to use the spld.exe tool an build a self contained executable but that requires the corresponding C compiler from Microsoft.
(I am one of the SICStus Prolog developers)