Programming :: Script That Creates Files From Svn Checkout And Compress Them Using Tar.gz ?
Oct 22, 2009
I'm creating a script that creates files from svn checkout and compress them using tar.gz the script gets the repository name from command line argument i need to capture a number from the last line of the output and create a file name from it.
The svn returns output of all the file names from the repository and in the end it says: revision number xxxxx. i need to get this number and then rename the tar.gz to it. how do i save the output to a variable and get this number.
I want to package my application for linux, I use zip/tar.gz/7z/rar to do the compress in Windows.Because I do the compress in Windows, so when I extract the package in Linux, the file permission is reset.The problem is Only the tar.gz can let me extract runable files, other format (zip/7z/rar) not (the file permission is reset to 644).So my question is how to compress my files using zip/7z/rar while reset the permission to 755.
I just read in my Linux+ resources that it is not a wise idea to compress tar files with gzip if my tape drive supports compression. In addition, the resources mention that using gzip for tar files runs the risk of data lost if an error occurs with the compression.
Does anyone compress tar files for major backups/restore policies?
I want to know how to compress files to zip, rar or 7z with password using KDE or Dolphin interface and no command line. I can compress without password, I have not found an option to protect with password. What do I have to install or configure?
I currently have a bash script that runs and backs up my daily files onto a separate partition using Rsync, but I thought it would be good to use the Ubuntu-one service as an ADDITIONAL backup for really important files.
How do I compress then encrypt those files, and can I add any commands that will do this to my existing bash script?
Is there is anyway, with tar, zip, gzip, or any file compression type to compress without causing high CPU. In other words, limit how hard the CPU works to compress it? Of course I understand that this would cause the compression to take longer but time isn't too big of a concern.
i have noticed that if right click on many files types for instance iso files i don't have the option to store them in compress files at all i have one iso file now that i want to compress and split to three parts so i could upload it but as i said right click on the file don't helpbecause i don't have the option there so what can i do?
Today I tried to compress some folders containing backup files from last year. I right-clicked on the folders and selected compress as tar.gz. I let it work, and found that hours later, the folders were still compressing. How long is it supposed to take, anyway? I was trying to compress the two sets of backups simultaneously; together they're around 1.5 GB. They have many subdirectories.
I am trying to compress a folder and the contents within, while keeping the permissions the same. I then need to check if the compress file is corrupt or not. Base on that result I need to transfer the file.
cd /home/ops/Desktop/temp tar cvzfp backup-"$(date +%d-%b-%y)".tar.gz /home/ops/Desktop/dir1 gunzip -tl backup-"$(date +%d-%b-%y)".tar.gz
I download a lot of files that have been compressed into separate pieces by winrar, so that a 4gb file will be shown as dozen or so 93mb peices. In windows, using winrar, extracting them was rather easy but in Kubuntu whatever default program is being used throws a fit. In a perfect world I would want to get a open source alternative from synaptic, alternatively anything I can download in RPM I can eventually figure out. I want to avoid trying to get winrar working under wine.
I have two classes, for argument's sake A and B. A implements the core functionality, B is an encapsulated data structure. If you imagine this situation [code]...
From within B's member functions, I would like to access the public function() in class A. This is not an inheritance issue, they are two discrete classes with radically different functionality. Class A makes an object of B.
I'm looking for an app for Linux that creates bootable images. Back when I used windows, I used Imgburn. Now, I need an app like that for Linux. Wherever I looked online, I saw either one (or both) of these ideas.
1. Run Imgburn under wine 2. Get k3b
I don't like using wine because the programs run very slow. I'm not sure exactly how to get k3b to produce a bootable image. So that's where I'm stuck.
I'm writing a C++ application and need to work with process substitution in the Bash shell. I'm trying to find a way to validate the paths passed as arguments to my program, some of which point to FIFO files created by process substitution.
Is there a shell (or C++) way that I can check if the system creates these files in /dev/fd or if they are created somewhere else?
I have two users in home on Debian stable: user1 and ftpuser.Proftpd is configured so that it uses ftpuser for clients.How to set it up so that user1 can modify, delete, etc.. all files and directories that ftpuser creates?
I've been trying to understand pthread in C a little better. So I made a simple program that takes in a string from the command line and creates a thread to print the string. I've looked online and copied the basic concepts but there are something things I'm confused about. The programs works just fine, but I have questions. Here's what I have so far.
One thing I'd like to know is why the 3rd argument in the pthread_create function which is my SendMessage function needs to be typecasted to a void pointer and then send the address of the function. Also as for the 4th argument, I would see typecasting to void pointer in some of the pthread examples I saw online, but in my case I'm passing a char pointer, would this be correct? In which case would I ever want to pass a void pointer?
Do I need a pthread_exit(NULL) in my main and in the SendMessage function? If so, why? I added the sleep() function so that I could let the pthread_exit function in my SendMessage function execute first. I simply saw that the online examples on pthread had pthread_exit() in both locations.
I have a doubt about signals in C programming. I have done this little program to explain it. It creates a child process with fork and, when the child ends, receives the SIGCHLD signal and wait for its termination.Ok, quite easy, BUT when I execute this code the SIGCHLD signal is received twice, first as an error (returns -1) and the second one to finish the child process.I don't understand the meaning of the first received signal. Why is it generated? Is the code wrong? (if you add the SIGINT and press Ctrl+C during the execution it also receives two signals instead of one)
I need to creates string suffixes out of a Reference string. for eg. suffixes of abcdefg will be
1)bcdefg 2)cdefg 3)defg and so on...
create an array of pointers to point to the first few characters and then use that pointer to print the rest of the string.But when i print using the pointer i get GARBAGE values! shudn't std::cout<<ptr[w] print the string following the char it is pointing to? why do i get garbage values?
I have installed fedora 14 ami on one of the amazon instance. And installed subversion successfully using following command: # sudo yum install subversion But when i try to check out code from our subversion repository which exist on deifferent remote machine, the checkout commands just hangs indefinitely. If run "top" command then i can see that cpu usage shoots to 100%.
i need to checkout a project from cvs fort a particular user i use the following command cvs -d server:francis:francis@email@example.com:/projects/aa_cesar co myproject when i do it using the eclipse it works fine but when i do it command line it does not checkout the reason is it takes firstname.lastname@example.org unable to connect that is wrong username pasword credentials are given
Initialized empty Git repository in /home/tapas/LKP/pandora/linux-2.6/.git/ fatal: The remote end hung up unexpectedly Some one suggested me to check my firewall I am not clear as which port does git uses.
I found another thread similar to my question here: http://www.linuxquestions.org/questi...-issue-535818/
But I don't understand what the solution is. I believe this has something to do with the permissions on the directory im trying to check out so I did chmod 777 on subdirectory in /cvs(my cvsroot directory) and I was able to checkout subdirectory afterwards, but I still get the same error.
Parent: chid_pid=4356 i=0 parent's pid=4355 This is child 4356 i=0 This is child 4357 i=1
I can observe instead of two children(as I expect) processes there are three. This is because child process 4356 creates its own child. Why all the messages of the type "This is child X i=Y" are concentrated one under another? How exactly fork works? Is affected by the fact that I have a dual-core processor?