General :: Copy Images From Diff Folder In Shell?
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
ADVERTISEMENT
Mar 4, 2010
i need to copy files from a folder called output files to another folder called running but im not able to do it i always get a stat error
View 14 Replies
View Related
Jun 3, 2009
My manager askmed me to find out all the jpg files in a directory and copy to another destination directory.I tried to write a shell script.But the problem is this source directory contains thousands of subdirectories. The jpg files resides in all of these directories.We have to search inside all these sub directories.I am reallyconfused.Can Any one help me.I am only a beginner to Shell scripting.
View 1 Replies
View Related
Apr 8, 2011
I was wondering if there would be a way for me to copy the contents of a shared folder that's running on an XP system using shell script. Actually, there are two shared folders that I want to do this with. I want to be able to launch the script and automatically copy all the contents of each folder into two separate folders on my ubuntu desktop. For example;
Lets say that I have Shared Folders A1 and A2 on my networked XP system and I have Folders B1 and B2 on my Ubuntu desktop. I want the script to automatically copy the contents of A1 into B1 and likewise for A2 and B2. During the copying, I want the script set up such that any pre-existing files in the B1 & B2 folders will automatically get overwritten by the ones copied from A1 & A2.Is there any possibilities of me achieving this?
View 7 Replies
View Related
Feb 16, 2010
I would like to make a one-liner, which diff's "ps aux" output before and after killing a process. So basically it should be a combination of fallowing commands:
1) diff -u
2) ps aux | awk '{print $2}'
3) kill `ps aux | grep [c]ron | awk '{print $2}'`
4) ps aux | awk '{print $2}'
How to achieve this? Something like this:
Code:
diff $( kill `ps aux | grep [c]ron | awk '{print $2}'` && ps aux | awk '{print $2}' ) $( ps aux | awk '{print $2}' )
I don't have pgrep or pkill available.
View 3 Replies
View Related
Jul 2, 2010
Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,
Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.
$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.
View 1 Replies
View Related
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
View Related
Jun 2, 2010
I like the output of
Code:
git diff --color-words old..new
but I do not know how to set --color-words permanently in the ~/.gitconfig file.
Edit: I guess I should've said that I do not want an alias for diff --color-words
View 5 Replies
View Related
Oct 5, 2010
How can i compress to .gz my folder public_html:
media/sda7/user1/public_html/
I want all files and folders and subfolders and images and everything inside of public_html. Also to be saved on the same folder so i can find it easy How can i do it?
View 4 Replies
View Related
May 18, 2011
shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"
smthing like Code: #!/bin/bash
for files in /home/user/*
do
[code]....
View 1 Replies
View Related
Apr 5, 2010
Seems a utility called "xclip" and "xsel" are required, but is there anything simpler, that doesn't require extra utilities, along the lines ofCode:cat foo.txt > clipboardThis would for GNOME.
View 9 Replies
View Related
Apr 6, 2010
I installed Kubuntu 9.1 and then I downloaded Xampp of Linux to the desktop, however I have to extract it to /Opt/lampp. And that's the problem. I don't seem to have access or permissions to ?? I tried right-click | properties | permissions but the fields are greyed-out to make any changes.I am logged-in using the same user id/password I created when installing K9.1.
View 14 Replies
View Related
Jun 23, 2011
I want to copy a file (home/remote_computer_user/Desktop/test1.txt) from my remote office computer (a permanent URL + open port) to my home computer (home/home_computer_user/Downloads/).
How can I do this with shell commands in Linux?
My current thoughts:
ssh <user>@<computer1address> -p <port> - gives me a shell on the remote computer
(I think I should use scp, but I dont how exactly how in my case)
What are the exact commands I should use?
View 1 Replies
View Related
Jul 15, 2010
I often have issues starting my window manager--xfce. My computer misbehaves in one of 3 ways, one of which is to fail to open X, but generate several screens of info. I want to paste that info to this site, but since I'm in the shell, not the terminal (please correct my vocabulary if it's wrong here), I don't know how to copy and paste the output, since right-clicking doesn't give me a menu. Even if I could copy I'm not sure the information would be accessible in X. Are there any other options?
View 13 Replies
View Related
Jul 9, 2010
i want to copy one folder to server using terminal. iwant to copy datatable folder to server. it like this:
copy from
user: /home/qa/html/datatable
to
server: www/html
how to do that...i'm new about this..i try like this:
1> qa@qadesktop2:~$ ftp 10230.35.211
2> fill password
3> ftp>cd www/html
4> ftp>mput
(local-files)/home/qa/html/dataTable-1.6/*
View 3 Replies
View Related
Jul 10, 2011
I downloaded the bin file, and installed it but I haven't realized that I made the folder in the current directory. I would like to install in /usr/java.
Can I now just copy paste it there. Or I need to re-install to desired location I installed JRE , is that ok or I need to install sdk
View 1 Replies
View Related
Mar 16, 2011
I want to make the script to copy all folders which older than 7 days from Linux server to Windows server by Samba. And make it automatically by using cron
View 4 Replies
View Related
Jun 10, 2009
I'm trying to copy a list of files except the files which has ".log" in the filename to another folder.I can run it correctly when I am located in the Source folder, but not when I am in any other location.cd /home/me/Sourcels /home/me/Source -1|grep -v "^.*log$" |xargs -n 1 -iHERE cp -r HERE /home/me/DestinationHow can I indicate both Source and Destination Folder?
View 2 Replies
View Related
Sep 27, 2010
I am trying to use the cp command to copy some files around but want to preserve the entire folder structure. Example:
Then within the /backup location I want to see /backup/folder1/folder2/file.
I have tried cp -a and cp -p but neither give me the above.
View 3 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
Mar 16, 2011
I need to make my 1st ever script to backup VMware workstation VMs to a folder which is then backed up offsite. Here is what I have so far (will be croned):
Code:
sudo vmrun -T ws stop "/home/gareth/vmware/NagiosWeb/NagiosWeb.vmx" soft
sudo vmrun -T ws stop "/home/gareth/vmware/UbuntuBackup/UbuntuBackup.vmx" soft
**copy or rsync to /home/gareth/vmware-backup/ dir**
[code]....
1. Just to confirm, I need to place the above in a file with #!/bin/bash at the top and make it executable.
2. How do I know when the VMs have safely shut down so I can start the copy? I guess I can either a. wait a specified amount of time b. run some sort of if statement to confirm they are off.
3. How do I use Rsync or cp to copy to the backup folder?
4. How will I know the copy is complete so that I can start the VMs again?
View 3 Replies
View Related
Oct 22, 2010
i want make a bash panel and i want he will copy files from orginal folder to $user folder i mean when for explame i type i want install some server he say cp: cannot stat 'root/Desktop/2/files/beckup/sa-mp-steam': No such file or directory.
View 6 Replies
View Related
May 2, 2011
How to Copy the entire folder contents (including sub-folders and their contents) to another folder using PUTTY? Is there any command for that?
View 3 Replies
View Related
Feb 13, 2011
The reason I ask is, we have a home server running Fedora 12. I would like to be able to let anyone just plug in a flashdrive, and have Fedora automatically grab and copy all the files on that flashdrive to a specific share.
View 1 Replies
View Related
Jun 9, 2010
I own a web server (centos 64bit with cpanel on it) and my datacenter add me a second hard disk and i want first to locate from ssh where is it (the path) and then to copy my mysql folder /var/lib/mysql to the new disk and have it like this /new/mysql on the second disk.
View 8 Replies
View Related
Jun 5, 2011
make a simple script to copy files from my "hfiles " directory to a "www" folder at leats I think its a directory, it has the permissions as "lrwxrwxrwx " but its like a public branch So I proceeded to make a file entittled MkPublic to copy the "hfiles" directory to the "www" branch
here is the code i used:
#!/bin/sh
# COPIES FILES
echo "copying files"
[code]....
when i try to run the script it tells me that there is a syntax error and an unexpected end of file and nothing seems to get copied anywhere so clearly there is something wrong with one im doing, i tried multiple ways : using the quotes, spacing the equal signs, but I seem to still get the same results.
View 8 Replies
View Related
Jun 14, 2011
Is it possible to use the keyboard in order to select some text in the terminal windows that is not in the currently edited line? (for example, in order to copy part of previous command output).
View 3 Replies
View Related
Dec 1, 2010
When i want copy a file or folder in some system folder like sbin,Etc.show me error about privilage but when I'm in console i use su command for become admin and i can copy my file or folder.in other operation system like windows user can copy anything,i want know for direct copy my folder in linux without console what should i do? i must join my user name in root group?
View 4 Replies
View Related
Feb 25, 2011
I've a problem, infact i can't resize images from shell (i use mogrify -resize 800x600 image.jpg or convert -size 800x600 image.jpg image.jpg) and it usually work for me.2 days ago i've bought a KOALA NANO PCit is a small 13x13 centimeters pc that work with a restricted(i don't know how) Debian lenny distro and its hardware is very thiny..So i tryied to resize some images from term but nothing to do. I think it's because of ram(128mb) or (processor 300mhz) or graphic memory.
View 6 Replies
View Related
Aug 8, 2011
Whenever I go inside a directory in Linux, it shows the file path at prompt like:
root@vivek-HP-Pavilion-dv6-Notebook-PC:/var/www/abc/def/
How can I change it to show short names instead?
View 1 Replies
View Related