How to Excluding Extensions Creating RAR & Uploading it

 
Thread Tools Search this Thread
Operating Systems Linux Debian How to Excluding Extensions Creating RAR & Uploading it
# 1  
Old 01-10-2011
Lightbulb How to Excluding Extensions Creating RAR & Uploading it

for media files in directory i want change every special char in name to "_" , create screenshots, get media information, then cat that info in 1 file, after that i want split (only) media files (not *.jpg,*.txt, etc.) with rar (including some file with info in each archive, and give each archive comment), than upload to myftp.com/path all archive parts and all *.jpg(export url in file), after all done delete archive. Please help me how to do that.. im newbie in unix.

Last edited by sunnymuffin; 01-16-2011 at 12:26 PM..
# 2  
Old 01-10-2011
Yes, the do cannot not be right after the for var in list. The mv looks OK. Why not do that first. Might check that there is no target else echo Collision: orig target
# 3  
Old 01-10-2011
found a solution in renaming & getting screenshots

DGPickett,
Thanks for take a part in this thread & help me to find solution on this question!

Code:
for file in *
do
mv "$file" $(echo "$file" | sed 's/[^A-Za-z0-9.]//g')
done 
rm -r ./scrsht
mkdir ./scrsht
ls *.jpg *.log *.txt | xargs rm -f
for file in *
do
/root/scr/mtn -i -t -h 150 -w 700 -c 2 -r 3 -k ffffff -B 100 -E 80 -g 2 -N_.txt "$file"
done
ls *.txt | xargs cat > techinfo.log
ls *.txt | xargs rm -f
ls *.jpg | xargs mv ./scrsht
mv techinfo.log ./scrsht

But i dont know how to move to the relative dir all .jpg files.. trying "ls *.jpg | xargs mv ./scrsht" and after listening dir for jpg files mv think that the name of 2nd file is a path..

Last edited by sunnymuffin; 01-10-2011 at 09:32 PM..
# 4  
Old 01-11-2011
Let the shell do the walking?
Code:
mv *.jpg scrsht

# 5  
Old 01-11-2011
Thanks! it works)

---------- Post updated at 09:45 PM ---------- Previous update was at 06:22 PM ----------

Hmm.. may somebody knows how to:
upload to ftp by extension and get links into file, then cat that file with links into one like this :
(
file 1
"somecode"
"somediffercode"

file 2
"another code
in two lines"
"just code
in two line"
) ===> cat they into one file like that
file 3
somecode
another big code
in two lines

"somediffercode"
"just code
in two line"

Any solutions?
Thanks in advance!!
# 6  
Old 01-12-2011
If you extract two files from the archive to stdout, they are concatenated. Well, I am awash in lack of context! Smilie
This User Gave Thanks to DGPickett For This Post:
# 7  
Old 01-14-2011
))) Hmm i mean i have 2 files for exmpl. links & descriptions:
Code:
in links file some strings like that:
mysite.com/file.rar
mysite.com/file2.rar 
.. etc,
in description:
File: file.rar
Size: 76.56 MiB
File: file2.rar
Size: 72.56 MiB
.. etc

and i need to get output looks like that:
Code:
File: file.rar
Size: 76.56 MiB
mysite.com/file.rar

File: file2.rar
Size: 72.56 MiB
mysite.com/file2.rar 

..etc

.. So if you can please help me to do this))
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Readin document & creating path

Need a way to read a file in who every line is a path to a directory and make shortcut to that directory on a specific place. Example: line in the document /media/gogo/6651-FEAB/Desktop/ /media/gogo/6651-FEAB/Desktop/alex/ /media/gogo/6651-FEAB/linux/ ... (3 Replies)
Discussion started by: gogok_bg
3 Replies

2. Programming

Script for creating a directory & move the .tif files in it.

Hi Team, I have thousands of TIF files which are converted from PDF. Below is a sample of it. LH9406_BLANCARAMOS_2012041812103210320001.tif LH9406_BLANCARAMOS_2012041812103210320002.tif LH9406_BLANCARAMOS_2012041812103210320003.tif LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Discussion started by: paragnehete
9 Replies

3. Shell Programming and Scripting

creating delimiter file & append with cron

I have the following script working fine, and need to generate a file delimiter (with tab or special character) for Excel data import. The script will run every hour in crontab to append the new rows to the delimiter, so that I can collect the data for i.e. a week, which will give me a lot of... (0 Replies)
Discussion started by: Daniel Gate
0 Replies

4. Shell Programming and Scripting

Searching for a string in .PDF files inside .RAR & .ZIP archives.

Hi, I have got a large number of .PDF files that are archived in .RAR & ZIP files in various directories and I would like to search for strings inside the PDF files. I would think you would need something that can recursively read directories, extract the .RAR/.ZIP file in memory, read the... (3 Replies)
Discussion started by: lewk
3 Replies

5. Shell Programming and Scripting

Creating tar excluding links

hi, How do i create a tar file of a directory excluding the links in that particular directory and its sub-directories. The below command doesnt work for me. tar -cvf abc.tar /dir1 --exclude"^l" (1 Reply)
Discussion started by: yesmani
1 Replies

6. UNIX for Dummies Questions & Answers

Creating tar file for subdirs, excluding one and preserving user info

Hi All, I am not one of the super users / root for AIX 5.3 system. There is a filesystem Say /DIR1 and its has several subdirs in it say SUBDIR1, SUBDIR2, SUBDIR3. Can I create a tar file for all files under DIR1 and SUBDIR1, SUBDIR3. Excluding SIBDIR2? Also how can I preserve... (2 Replies)
Discussion started by: Hangman2
2 Replies

7. Filesystems, Disks and Memory

Creating /boot partition & MBR concerns

I have 40GB HD with mepis8, swap, MBR and under flags word boot. I also have a 160 GB external with a few Linux OS, no swaps, no extended etc. I am total Linux no MS I would feel more secure by resizing that sda1 partition and creating a /boot partition with the MBR housed there. Is that a... (1 Reply)
Discussion started by: worthamtx
1 Replies

8. Shell Programming and Scripting

creating & sending formatted (with bolds & colors) CSV

Hi , I have a situation. Need is to create & send a formatted file with header in BOLD & colored & some sequel results as a content. I know echo -e \033 command, but its scope is limited in PUTTY. How to retain the formatting out of Putty; say after someone opens a email attachment... (2 Replies)
Discussion started by: infaWorld
2 Replies

9. Shell Programming and Scripting

Creating multiple extensions

Friends I want to automat sending a letter to different persons whose directories are named as 001, 002, 003, 004. To push the same letter to all these directories, I need to name the letter as letter.001, letter.002 like that. Is there any method whereby I get the extension of this letter... (2 Replies)
Discussion started by: chssastry
2 Replies

10. UNIX for Dummies Questions & Answers

Creating subusers & assigning limited rights

Hi all, I need to create 2 users sde1 & sde2 with limited authority(only for read). I know the root password.Pls tell me step by step procedure how to create these subusers to root. the commands which these subusers can run are : 1)#df -k 2)#ps -ef|grep syb 3)#ps -ef|grep omc 4)ps... (4 Replies)
Discussion started by: xs2sandeep
4 Replies
Login or Register to Ask a Question