General :: Copy All .jpg Images In Subdirectories To A Specific Directory?
Aug 5, 2010
I have .jpg files in many subdirectories from where I need to copy all the images from all the sub directories and paste them to a specific directory.I have used `cp -rf *.jpg media/sik/` which only copies the .jpg files of the directory in which I was working.
View 5 Replies
ADVERTISEMENT
Nov 18, 2010
This question is very similar to this one except that I want to maintain the file's original subdirectories.
For example if I had
/temp/a/a.txt
/temp/a/a.jpg
/temp/a/b.txt
/temp/b/c.txt
/temp/d/d.txt
/temp/d/d.jpg
/temp/d/e.txt
/temp/f.txt
[Code]...
View 2 Replies
View Related
Jun 10, 2010
I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.
View 2 Replies
View Related
Jun 13, 2011
I'm trying to setup an Apache server on my computer which will allow browsing of files in a specific directory and subdirectories, without needing any sort of authentication.
I've got the Apache2 server up and running through yast, and everything works fine as long as I try to point it to the /www/htdocs folder. However, I want to point it at another folder, which is on another partition. This partition is formatted as NTFS, if that matters at all (here's some background on some permissions issues I had with the NTFS partitions recently).
When I change the "Directory" setting in the Yast http server configuration utility to the directory on the NTFS partition I wish to use, attempting to access the server results in the following error:
Code: Access Forbidden: You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster.
Error 403
192.168.1.100
Mon Jun 13 23:43:29 2011
Apache/2.2.17 (Linux/SUSE)
View 4 Replies
View Related
Jul 20, 2011
I would like to find the command that copy my eclipse options to another workspace code...
It doesn't work, and it could be source of error to write the path .metadata/.plugins manually. It certainly a better idea to create a complete script ?
View 1 Replies
View Related
Jun 7, 2010
tell me the command used to find a specific word in directories and sub-directories in linux?
View 4 Replies
View Related
Jan 24, 2011
1. How can you find all first level subdirectories under the current directory?
2. How will you show the last 100 lines of the file "foo.log"?
3. How will you Stream the contents of a the log file "foo.log" as it gets written to?
4. How can you grep for a pattern on a gzip'ed file? e.g., find "foo" in bar.gz
5. Find all lines in the file "foo" which DON'T have the pattern "bar"
6. Your web server is running very slowly. If you can login to the server, what command will you run to find out cpu and memory use?
7. Extract the file foo which is a part of the tar'ed, gzip'ed file bar.tar.gz
8. You attach a usb disk to your linux desktop, but it does not show up. How can you get more information about the error?
9. What is the secure way to login to remote systems?
10. What is the difference between TELNET and SSH?
11. Given a file 'a' with the following permissions -rwxrwxrwx 1 rohit rohit 0 2011-01-24 13:30 a Change its permissions such that it is only readable and writable by its owner, not accessible by anybody else in the group and only executable by the world
12. Difference between using ' and " for quoting a string / command in a shell
13. In the attached text file (test.txt) replace all occurrences of 'red' with 'yellow' without using an editor (i.e. from the command line)
14. How would you suppress output written to stderr by a command
15. Meaning of the #! notation in scripts e.g. #!/bin/sh
16. What is the output of the attached shell script test.sh Scripting questions, all based on the attached file access.log. Use one of perl, python, ruby, or shell scripts to solve these questsions. If any answer is obtained using just the command line, please include those commands as well.
17. How many accesses were made between 10am and 11.30am on Jan 24, 2011?
18. How many unique IP addresses accessed this server?
19. For every IP address which accessed this server, output a report showing number of hits for every type of HTTP status. For e.g., IP 192.168.1.20 has 164 hits with status 404 and 1690 hits with status 200.
View 8 Replies
View Related
Feb 7, 2011
I am a noob and I am trying to display a count of the number of subdirectories in a directory. I have been able to use find -type d to list directories and subdirs but I want a numerical value of dirs and subdirs. I know ls -l gives a count but when I try ls -l -d all it shows is "." I also have tried a combination with the -R option but nothing seems to be working for me.Please forgive my ignorance but I am working on a script for class and this is the first step.
View 3 Replies
View Related
Feb 11, 2010
I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf
However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?
View 4 Replies
View Related
Aug 10, 2010
I need to give a user write access to /var/www and its subdirectories. The current directory permissions are as follows:rwx r-x r-x root root
I added the user to the root group but that didn't seem to help.I read I could chmod -R to change the access to write for the www directory and subdirectories but I don't want to change things and mess up the website. How can I give the user access to write to the www directory and subdirectories without messing anything up? Would changing the www directory group owner to his group cause an issue anywhere?
View 3 Replies
View Related
Mar 24, 2010
I am trying to write a very simple script that will go to every subdirectory of a single directory and run a command (lets call it make_ndx).I know I can write this the long way with in a text document with something like:
cd /"the directory"/"the 1st subdirectory"
make_ndx
cd ..
cd "the 2nd subdirectory"
cd ..
Alternatively, I also tried: for i in 'find /path/somemorepath -type d -mindepth 1'; do cd $i; make_ndx -f *.gro; done which returns me with the error cd: find: no such file or directory. But if I run the find command by itself to test if I am calling the right directories, it gives me the exactly the output I am looking for. Any ideas? Should I just write the find results to a file and loop through the contents of the file (which seems a little bit like overkill) or am I just making a simple typographical mistake and I am just not seeing it?
View 7 Replies
View Related
Oct 11, 2010
How can I allow normal users to mount a tmpfs under any subdirectory owned by them?
View 3 Replies
View Related
Apr 20, 2011
I have 500 folders of templates in one folder. Now each folder has file called template_thumbnail.png . now i want something so that all those files get copied to one folder with name same as the home folder name
I have cygwin installed and i can copy that folder in there so basically it will linux shell script
View 1 Replies
View Related
Jul 20, 2011
sudo cp ../../../rootfs_maker_ramdisk drivers/filesystem/ -rf
give below errorCode:cp: cannot create special file ...._rootfs/dev/hda4': No such device or addressi get this error only in some specific locationsif i dont use sudo then i get permission denied msg
View 4 Replies
View Related
May 13, 2011
I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.
Code:
That is what it shows in the man pages, but when I do that, it says cp: no match
View 5 Replies
View Related
Oct 20, 2010
I've been doing some file-sharing with Ubuntu. And I've noticed that the files only in the immediate directory is shared, the rest of the folders are shown in other PCs but access is denied. How can I share all the subdirectories in a folder without having to them manually?
View 6 Replies
View Related
May 26, 2011
I wanna copy all folders and files created from 01.01.2011 until today to new placeie:cp -r /home/moviecar/public_html/wp-content/uploads/ /home/teaser/public_html/wp-content/uploads
View 4 Replies
View Related
Aug 2, 2010
I'm having trouble figuring out how to list the contents of a directory and exclude any subdirectories.
View 5 Replies
View Related
Dec 26, 2010
In reading the rsync man page and browsing a lot of websites, I ended up a bit confused, or maybe it was just too much eggnog. Anyway, to exclude a directory "videos" with everything in it, which is /home/user1/camera/videos and I'm rsyncing the whole user1 directory to an external drive
[code]...
View 1 Replies
View Related
Aug 5, 2010
I'm trying to create a Virtual Machine in VMWare Server for Linux. I'm at the part where it asks for an ISO image. The inventory is empty. I don't know what directory this actually corresponds to on my Linux system. I tried moving the .iso to my home directory but VMWare still does not see it.
View 1 Replies
View Related
Mar 1, 2010
I've found several posts discussing how to do this in with the terminal, but none exactly fit what I am trying to do. And since I'm still very new, I was hoping for some help.
I have a parent directory called "Music." The subdirectories all start with "artist", some go further as in "artist/album/cd1". So right now the structure varies in the following ways code...
How can I move all the files (or the file types that I choose) to the parent directory "music"?
(By the way, for any who are interested, this is so that I can use an external hd with a PS3. ("playstation 3"--for anyone who was in my predicament searching the threads)
View 7 Replies
View Related
May 28, 2010
I need to write a script that is given a directory as an argument, and it prints the last modified file from that directory and all its subdirectories.
for example:
$ newest /usr/etc
--> /usr/etc/httpd/httpd May 28 12:16
If I had to do it only for the current dir, it would be easy...I'd probably use "ls -lt" and then show only the first line...
View 1 Replies
View Related
Jul 20, 2010
This should be a quick one. I'm trying to backup a single directory and it's subdirectories on my Lucid Server to a freenas box across my network. This is what I'm using to do that..
rsync -r -a -v -z * --delete freenas:dSIBackups It almost works perfectly except for one problem. When a file is deleted at the source, this command doesn't seem to delete it on the receiving end. I assumed that the --delete would do that but aparently not. Can anyone think of a reason that this would happen?
View 3 Replies
View Related
Jul 27, 2011
A function by name abc is called in many files. I want to copy all the lines with the function call to an output file.A simple grep on function name doesn't help me as the function call is spanning across multiple lines as follows:
abc(parameter1,
parameter2,
parameter3);
So I want to copy all the three lines (till semicolon) to the output file.The problem is because there are more than 200 calls for the same function and I cannot do it manually
View 2 Replies
View Related
Jul 15, 2011
I have used Awk in the past to isolate the file name from a given path..that is to say, I may have a list of files contained in list.txt.Can someone please post the Awk command that would do this? (I assume it will be very similar in form to the Awk command I showed above.)The point is, sometimes I may want to isolate the second directory, sometimes I may want to isolate the third directory or tenth or whatever - so I am hoping that if someone posts the Awk command to isolate the second level directory (to produce the output I showed in Fig.3) it should be fairly obvious by looking at the form of this command how to alter it and so isolate any other directory I want.
View 5 Replies
View Related
Feb 4, 2010
I need to find a program that will allow me to take images 600 x 600 and resize down to fit a specific size like 95 x 139. I need the images to not distort. There is white space around the objects in the images. I also need to be able to crop on a pixel scale to know that I am resizing it correctly.
View 3 Replies
View Related
Jun 22, 2009
I'm trying to find all zip files timestamped from the past 7 days, then unzip them into a different director.I tried the following, but it only unzipped one of three files that meet the 7 day criteria. What am I missing?Code:find /home/user/public_html/zip_files/ -iname "*.zip" -mtime -7 -print0 | xargs -n10 unzip -LL -o -d /home/user/public_html/another_directory/
View 1 Replies
View Related
Apr 9, 2010
Im trying to add users to my nfs server with a specific home directory that already exists. Can this be done? I've done some research on google and other forums but cant seem to find the answer.
View 7 Replies
View Related
Mar 10, 2010
If i am in the root directory and i need to search for a specific file in the sysconfig directory, is there any way to search this directory for a file?
View 10 Replies
View Related
Jan 7, 2010
I have a requirement to print images (two to be precise) from the command line of a given size and without losing too much quality.
So, I may have two images, a.jpg and b.jpg which may be 4x4" and 6x4" respectively (the sizes may vary). I need to be able to print both these on a single sheet of paper (one under the other) at a given size for each - so a may be 2x2" and b may be 3x2" - the aspect ratio will always be maintained (or as near as possible!)
I am currently doing this a very messy way (because I don't know any other way!!) - basically I am converting the picture to a given size using a set density using convert and then concatenating the two using montage.
Here is part of my script:
Code:
Don't worry too much about the case statement at the end - that is just to be able to select to print either A, B or A and B.
The issue with this is that is doesn't work great if the aspect ratio is not maintained perfectly and also, it loses quite a lot of quality on the print.
I have a very old windows app which I wrote years back in VB (o dear! ) which does the same thing and the quality is fine (I am running it through wine). I want it to be command line though because I want to run it as part of other scripts etc.
View 4 Replies
View Related