Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
85 views

I am trying to recursively untar a whole lot of directories that have .tar files in them, but without creating any new subdirectories. I am successfully able to do one at a time with this command gtar ...
bk_32's user avatar
  • 111
0 votes
1 answer
655 views

How do I make script exctract tar then enter the extracted tar directory? I was trying xtract #!/bin/bash tar -xvf $1 && cd $1 Usage example suppose there's foo.tar.xz so how to use it: ./...
Muhammad Ikhwan Perwira's user avatar
0 votes
1 answer
224 views

I am working on a script to backup and gzip a set of MySQL tables, scp/ssh them to a different server and then unpack them current script is: #!/bin/bash DATE=`date +"%d_%b_%Y_%H%M"` ...
Pacific_Bill's user avatar
0 votes
1 answer
126 views

printf 'n Log-%02d.tar\n' {2..}|tar cf /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/OUTPUT/Log-01.tar -ML1900m /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/Temp I tried to use the ...
Subramanian's user avatar
0 votes
2 answers
2k views

I have 28,000 files of size 6.7 GB in the directory aaa/input. I need create TAR files in the directory aaa/output, such that each TAR file cannot exceed 1.9 GB, so I have to tar the 28,000 files into ...
Subramanian's user avatar
0 votes
1 answer
545 views

If the location DATA/AAA/INPUT contains n files (the file names are random job names), I need to create tar files for all the n files in the DATA/AAA/OUTPUT location with a common name format. So, if ...
Subramanian's user avatar
1 vote
2 answers
5k views

I am trying to test if the tar file I am about to create already exists. If it doesn't then I want to create the tar file (this part of the code works). However the if statement testing if that file ...
Natalie Lloyd's user avatar
1 vote
1 answer
871 views

I am trying to create a script such that it could tar.gz all the previous log of per 7 days log and exclude the tar file in next run. Is the script ok or should I have to make a change find /home/...
The Story Teller Nepal's user avatar
4 votes
4 answers
5k views

On my debian 9.4 machine I have a script that automatically compresses & backups up all my files in a srv/ with the date in the name xx-xx-xxxx.tar. It is moved to my backups/ directory. I would ...
coolman5594's user avatar
1 vote
2 answers
2k views

Is there an elegant one-liner to tar/archive the whole directory and delete it afterwards? So far I came up with bulky solutions. from: # ls -la drwxr-xr-x 3 root root 4096 Jul 4 15:01 . drwxr-xr-x ...
Eugene A's user avatar
  • 125
6 votes
3 answers
14k views

I have a variable myVar in bash containing a long string that looks like this: -rw-rw-rw- root/root 16 2018-02-12 10:03 foo_tar/baz1234_ I want to delete everything in myVar before the last slash (...
jlnkls's user avatar
  • 153
0 votes
1 answer
1k views

I have a script that takes filenames as positional parameters. I perform a few operations on these and then tar them. Currently my script is not working. The echo line is there for debugging ...
goldengreen's user avatar
0 votes
3 answers
3k views

Basically this is the question im trying to answer 2) Write a shell script (fridaybackup.sh) which will, if run on Friday, backup all files in user2 home directory. The script will create a backup (...
Taylor Cairns's user avatar
0 votes
2 answers
6k views

I'm trying to write a Unix script that will go to a specific directory and tar.gz all the log files that are older than 2 days. So far I have this but it doesn't work. Any help would be appreciated. ...
Loc's user avatar
  • 1
1 vote
3 answers
5k views

Within a given directory in linux environment, I need to pick all files modified after a certain date (let's say 7 days) as well as all directories (only in root directory, hence non recursively) ...
Seether's user avatar
  • 111

15 30 50 per page