Search Results

Search: Posts Made By: JKMlol
9,746
Posted By JKMlol
Like this?#!/bin/bash DIR=/home/user/files cd...
Like this?#!/bin/bash
DIR=/home/user/files
cd $DIR
ls *.jpg >/dev/null 2>&1
if [ $? == 0 ]; then
for FILE in *.jpg
do
F=${FILE%.jpg}
tar -cf $F.tar $FILE
gzip $F.tar
mv -f...
9,746
Posted By JKMlol
Anyone? I guess I have to cd $DIR first, but...
Anyone?
I guess I have to cd $DIR first, but I'm not sure.
9,746
Posted By JKMlol
Hehe, it's actually not jpg files, it was just an...
Hehe, it's actually not jpg files, it was just an example.
9,746
Posted By JKMlol
Thanks guys! I found another 'bug'. I only...
Thanks guys!

I found another 'bug'. I only want the jpg file to be packed, nothome
user
files
image.jpg
9,746
Posted By JKMlol
Hmm, if it's no .jpg files in the files, it...
Hmm,

if it's no .jpg files in the files, it makes two files:
.tar
.tar.gz

Is it possible to run the for - only if there are any .jpg files in the dir?

Thanks.
2,804
Posted By JKMlol
Thank you so much, but.. prev_month returned 0...
Thank you so much, but..
prev_month returned 0 and not 03. :/
2,804
Posted By JKMlol
Need some help with an archive script
I'm not sure how to solve the $month-1 thingy or the foreach sentence, so I need some help./*

folders =
folder1
folder2
folder3
folder4
folder5
...
9,746
Posted By JKMlol
Thanks for the reply, but would this script only...
Thanks for the reply, but would this script only work for *.jpg files? <3
9,746
Posted By JKMlol
Shell script: foreach file -> targzip
Hi there,

I need some help with a shell script (I'm no sh script expert, but I hope this will explain how I want my script):dir = /home/user/files/
foreach(*.jpg file in $dir) {
tar -cf...
1,535
Posted By JKMlol
Thanks jim mcnamara! Where do I place the...
Thanks jim mcnamara!

Where do I place the password for the sftp session? It doesn't matter if the password is written directly in the script, but I've read about sftp -b passwordfile user@host,...
1,535
Posted By JKMlol
Need some help with a small SFTP script
Hi there!

Could anyone help me out with a shell script that should..
- sftp myuser@myhost
- cd public_html/misc/
- mkdir `date --date='1 day ago' +%Y_%m_%d`
- cd `date --date='1 day ago'...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 02:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy