tar.zip error during saveshell script to do some text manipulation of text file data structure and slight...

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

What is GPS' 19 year rollover and does it present a cybersecurity issue?

"listening to me about as much as you're listening to this pole here"

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Unbreakable Formation vs. Cry of the Carnarium

Why do UK politicians seemingly ignore opinion polls on Brexit?

Why doesn't a const reference extend the life of a temporary object passed via a function?

Why airport relocation isn't done gradually?

What does "enim et" mean?

Are white and non-white police officers equally likely to kill black suspects?

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

COUNT(*) or MAX(id) - which is faster?

Where to refill my bottle in India?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

What is the command to reset a PC without deleting any files

Filling an area between two curves

aging parents with no investments

Why was the "bread communication" in the arena of Catching Fire left out in the movie?

Is there a way to make member function NOT callable from constructor?

A poker game description that does not feel gimmicky

Where else does the Shulchan Aruch quote an authority by name?

Is there a familial term for apples and pears?

Why is my log file so massive? 22gb. I am running log backups

Could Giant Ground Sloths have been a good pack animal for the ancient Mayans?



tar.zip error during save


shell script to do some text manipulation of text file data structure and slight content changesWhere to put wrapper scripts?Intro to shell scripts with basic application: how do I set my computer to make an archive of a particular folder every day?Rename files depending on their parent directoryConnect via telnet and doing certain operationsAutomatic backup and exclude of certain foldersDebian/Raspberry usb webcam test before issuing fswebcam script, multiple fails will crash OSUploading multiple files via FTP using curlparallel processing reading from a file in a loopPushing files and folders to a specific folder on ftp






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm making a save script to save somes folders in my /home. To do that I loop the nomber of folder in /home, and launch a save for each of them. These folder contain jar file, and some .txt . properties and other folder in here. First time I launch the script it was working great, I modify it and same, but yeterdstay when I try some feature It going wrong and I don't find why :/



I have this error when I use the tar -cjf command to create .tar.zip archive »




tar: home/myFolder : impossible stat: no file or folder of this type




backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup
list_dossier=`ls ../home`

for server in $list_dossier
do

tar -cjf $dirbackup/$server.tar.zip home/$server

done


EDIT
I'm trying to keep this shape of save : a folder with name the date, and in it, X archves contain my X folders of my /home



#!/bin/bash
backupdate=$(date +%Y-%m-%d)
dirbackup=/save/$backupdate
mkdir $dirbackup

for server in /home/*
do
echo $server"test"
tar -cjf $dirbackup$server.tar.zip $server

done

exit









share|improve this question









New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

    – Kusalananda
    yesterday











  • You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

    – Jeff H.
    yesterday













  • The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

    – BoBsmil3Y
    21 hours ago




















0















I'm making a save script to save somes folders in my /home. To do that I loop the nomber of folder in /home, and launch a save for each of them. These folder contain jar file, and some .txt . properties and other folder in here. First time I launch the script it was working great, I modify it and same, but yeterdstay when I try some feature It going wrong and I don't find why :/



I have this error when I use the tar -cjf command to create .tar.zip archive »




tar: home/myFolder : impossible stat: no file or folder of this type




backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup
list_dossier=`ls ../home`

for server in $list_dossier
do

tar -cjf $dirbackup/$server.tar.zip home/$server

done


EDIT
I'm trying to keep this shape of save : a folder with name the date, and in it, X archves contain my X folders of my /home



#!/bin/bash
backupdate=$(date +%Y-%m-%d)
dirbackup=/save/$backupdate
mkdir $dirbackup

for server in /home/*
do
echo $server"test"
tar -cjf $dirbackup$server.tar.zip $server

done

exit









share|improve this question









New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

    – Kusalananda
    yesterday











  • You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

    – Jeff H.
    yesterday













  • The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

    – BoBsmil3Y
    21 hours ago
















0












0








0








I'm making a save script to save somes folders in my /home. To do that I loop the nomber of folder in /home, and launch a save for each of them. These folder contain jar file, and some .txt . properties and other folder in here. First time I launch the script it was working great, I modify it and same, but yeterdstay when I try some feature It going wrong and I don't find why :/



I have this error when I use the tar -cjf command to create .tar.zip archive »




tar: home/myFolder : impossible stat: no file or folder of this type




backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup
list_dossier=`ls ../home`

for server in $list_dossier
do

tar -cjf $dirbackup/$server.tar.zip home/$server

done


EDIT
I'm trying to keep this shape of save : a folder with name the date, and in it, X archves contain my X folders of my /home



#!/bin/bash
backupdate=$(date +%Y-%m-%d)
dirbackup=/save/$backupdate
mkdir $dirbackup

for server in /home/*
do
echo $server"test"
tar -cjf $dirbackup$server.tar.zip $server

done

exit









share|improve this question









New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I'm making a save script to save somes folders in my /home. To do that I loop the nomber of folder in /home, and launch a save for each of them. These folder contain jar file, and some .txt . properties and other folder in here. First time I launch the script it was working great, I modify it and same, but yeterdstay when I try some feature It going wrong and I don't find why :/



I have this error when I use the tar -cjf command to create .tar.zip archive »




tar: home/myFolder : impossible stat: no file or folder of this type




backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup
list_dossier=`ls ../home`

for server in $list_dossier
do

tar -cjf $dirbackup/$server.tar.zip home/$server

done


EDIT
I'm trying to keep this shape of save : a folder with name the date, and in it, X archves contain my X folders of my /home



#!/bin/bash
backupdate=$(date +%Y-%m-%d)
dirbackup=/save/$backupdate
mkdir $dirbackup

for server in /home/*
do
echo $server"test"
tar -cjf $dirbackup$server.tar.zip $server

done

exit






shell-script






share|improve this question









New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 20 hours ago







BoBsmil3Y













New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









BoBsmil3YBoBsmil3Y

12




12




New contributor




BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






BoBsmil3Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1





    Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

    – Kusalananda
    yesterday











  • You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

    – Jeff H.
    yesterday













  • The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

    – BoBsmil3Y
    21 hours ago
















  • 1





    Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

    – Kusalananda
    yesterday











  • You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

    – Jeff H.
    yesterday













  • The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

    – BoBsmil3Y
    21 hours ago










1




1





Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

– Kusalananda
yesterday





Is that the actual script you are using? There's a syntax error in the for statement. There ought to be a ; (or a newline) before do. Also, you are much better off iterating over /home/*/, as in for serverpath in /home/*/; do server=$(basename "$serverpath"); tar ... "$serverpath"; done or something like that.

– Kusalananda
yesterday













You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

– Jeff H.
yesterday







You may also have problems with your ls ../home results if the files listed have whitespace in their names, or newline characters etc.. consider feeding your for loop (or a while loop) a list of null separated results instead.

– Jeff H.
yesterday















The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

– BoBsmil3Y
21 hours ago







The do in my code was one line below, I have edit as my code is ^^ Ok for the /home/*/ and yes you right @JeffH.I have a space after the server name !

– BoBsmil3Y
21 hours ago












1 Answer
1






active

oldest

votes


















0














backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup

find ../home -type d -not -name "." -a -not -name ".." -exec tar -cjf $dirbackup/'{}'.tar.bz2 '{}' ;





share|improve this answer
























  • There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

    – Kusalananda
    21 hours ago











  • Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

    – BoBsmil3Y
    20 hours ago











  • I have edit the question to update my code

    – BoBsmil3Y
    19 hours ago












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






BoBsmil3Y is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511118%2ftar-zip-error-during-save%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup

find ../home -type d -not -name "." -a -not -name ".." -exec tar -cjf $dirbackup/'{}'.tar.bz2 '{}' ;





share|improve this answer
























  • There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

    – Kusalananda
    21 hours ago











  • Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

    – BoBsmil3Y
    20 hours ago











  • I have edit the question to update my code

    – BoBsmil3Y
    19 hours ago
















0














backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup

find ../home -type d -not -name "." -a -not -name ".." -exec tar -cjf $dirbackup/'{}'.tar.bz2 '{}' ;





share|improve this answer
























  • There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

    – Kusalananda
    21 hours ago











  • Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

    – BoBsmil3Y
    20 hours ago











  • I have edit the question to update my code

    – BoBsmil3Y
    19 hours ago














0












0








0







backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup

find ../home -type d -not -name "." -a -not -name ".." -exec tar -cjf $dirbackup/'{}'.tar.bz2 '{}' ;





share|improve this answer













backupdate=$(date +%Y-%m-%d) 
dirbackup=/save/$backupdate
mkdir $dirbackup

find ../home -type d -not -name "." -a -not -name ".." -exec tar -cjf $dirbackup/'{}'.tar.bz2 '{}' ;






share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









RoadowlRoadowl

112




112













  • There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

    – Kusalananda
    21 hours ago











  • Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

    – BoBsmil3Y
    20 hours ago











  • I have edit the question to update my code

    – BoBsmil3Y
    19 hours ago



















  • There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

    – Kusalananda
    21 hours ago











  • Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

    – BoBsmil3Y
    20 hours ago











  • I have edit the question to update my code

    – BoBsmil3Y
    19 hours ago

















There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

– Kusalananda
21 hours ago





There is no need to quote {}. Also note that this will be a pathname, not a filename. Using it as part of a filename would do unexpected things.

– Kusalananda
21 hours ago













Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

– BoBsmil3Y
20 hours ago





Yes it's working like that :) But I want to separate each folder save ^^ I have tried your code, and it's seems to "ignore" some files. I have the same error as the beginning but only for few folder ... :/

– BoBsmil3Y
20 hours ago













I have edit the question to update my code

– BoBsmil3Y
19 hours ago





I have edit the question to update my code

– BoBsmil3Y
19 hours ago










BoBsmil3Y is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















BoBsmil3Y is a new contributor. Be nice, and check out our Code of Conduct.













BoBsmil3Y is a new contributor. Be nice, and check out our Code of Conduct.












BoBsmil3Y is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511118%2ftar-zip-error-during-save%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...