9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location.
Ex:
mainfolder1
file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure.
rsync is not... (7 Replies)
Discussion started by: Raji Perumal
7 Replies
2. Shell Programming and Scripting
I need my script to choose a random folder within a folder and set that folders name as a variable.
I can list all folders within a folder using
#!/bin/bash
dir='/folder'
file=`/bin/ls -1 -l "$dir" | egrep '^d' | sort --random-sort | head -1`
path=`readlink --canonicalize "$dir/$file"`... (6 Replies)
Discussion started by: digitalviking
6 Replies
3. UNIX for Dummies Questions & Answers
I would like to delete all files but keep all the .JPG files.
How can this be accomplished?
Thanks in advance (8 Replies)
Discussion started by: Xterra
8 Replies
4. Shell Programming and Scripting
Bash/scripting newbie here - I feel this might be a trivial problem, but I'm not sure how to tackle it. I've got a folder of a year's worth of files, with some random number of files generated every day of the year (but at least one per day). I'm writing a script to automatically grab the file with... (6 Replies)
Discussion started by: WildGooseChased
6 Replies
5. OS X (Apple)
Hello everyone,
I'm running Mac OS X Leopard (10.5.8) and I want to use the Terminal to help automate this tedious and laborious command for me:
I need to extract all of the .m4p files in my "iTunes Music" folder which reside in folders of the artist, and then subfolders for the albums and... (2 Replies)
Discussion started by: qcom
2 Replies
6. Shell Programming and Scripting
Hi, Dear all:
One question ! ^_^
I'm using bash under Ubuntu 9.10.
My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders.
To rename all ".JPG" to ".jpg" in a single folder,
for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Copying all the normal files from 1 folder to another on a unix platform. I pass in 1 or 2 arguments, the folder... (0 Replies)
Discussion started by: MW99
0 Replies
8. Shell Programming and Scripting
Hi,
I wanted to know how to create a folder using mkdir and then have it copy the permissions from another specified folder on the system.
For example if I did this:
mkdir /Volumes/USBSTICK/System
How can I make it copy the permissions from the /System folder ?
Thanks (4 Replies)
Discussion started by: pcwiz
4 Replies
9. Shell Programming and Scripting
Hi all,
I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt.
I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
Discussion started by: satish2712
5 Replies