Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to move all files in a directory and subdirectory? Post 302535668 by Straitsfan on Friday 1st of July 2011 11:02:35 AM
Old 07-01-2011
How to move all files in a directory and subdirectory?

I'm trying to organize my MB Pro by moving all my jpeg files to a single folder from the desktop. There are some on the desktop that are not in any folder. I was at the command line and typed
Code:
mv *.jpg "Jpeg files"

but it only moved the files that were on the desktop, not any of the ones that were in any subdirectories. I'm forgetting something here -- can someone tell me how to get all the jpeg files (or any other files of a type, for that matter) -- no matter which subdirectory they're in -- and move them to the designated folder I want?

Last edited by Franklin52; 07-04-2011 at 04:04 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files in directory and its subdirectory

I am writing a script which reads a file line by line and then assigns it to a variable like this 1090373422_4028715212.jpg. I have images with file name of this format in some other directory. In my script I want to assign variable with this file name and then find this filename in some other... (11 Replies)
Discussion started by: jyotib
11 Replies

2. Shell Programming and Scripting

Move all files not in a directory into a subdirectory named for each given file

Hi Everyone! Looking for some help with a script that will take all files in any given root folder (which are not already in a folder) and put them into separate folders with the name of each given file. Any ideas? Thank you! (1 Reply)
Discussion started by: DanTheMan
1 Replies

3. Solaris

Display the number of files in a directory and recursively in each subdirectory

Display the number of files in a directory and recursively in each subdirectory To look something like below, for example /var 35 /var/tmp 56 /var/adm 46 Any ideas how can we do this? :wall: (1 Reply)
Discussion started by: jakerock
1 Replies

4. Solaris

Display the number of files in a directory and recursively in each subdirectory

Display the number of files in a directory and recursively in each subdirectory To look something like below, for example /var 35 /var/tmp 56 /var/adm 46Any ideas how can we do this? Got a sun cluser global mount point which takes ages to mount everytime, need to understand... (5 Replies)
Discussion started by: jakerock
5 Replies

5. Shell Programming and Scripting

Changing ownership of a directory, subdirectory and files as same as in another server

accidentally i have changed ownership of a directory,subdirectory and files wil below command. I want to the change ownership back as same as in same directory on another server. How can i do it? chown -R user:group /u01 is there any simple script? it is really an urgent need.. (2 Replies)
Discussion started by: johnveslin
2 Replies

6. Shell Programming and Scripting

Globbling files in the direct subdirectory of the current directory

I want to list files that end with .c in the direct subdirectory of the current directory. I have tried the following command: find ./ -mindepth 2 -maxdepth 2 -name "*.c" Is that right? Or is there any easier way to handle that problem? Another problem is that I want to grep in a file to find... (5 Replies)
Discussion started by: Ray Sun
5 Replies

7. Shell Programming and Scripting

Remove all files except the subdirectory(without pattern) in a directory

I used rm * and it deleted the files in the directory but gives and error message for unsuccessful subdirectory deletion. "rm: cannot remove 'DirectoryName': Is a directory" I dont want to explicitly get the above error. What are the modifications I have to do in the rm command? (3 Replies)
Discussion started by: duplicate
3 Replies

8. Shell Programming and Scripting

How to move to the last subdirectory one by one?

Hi, How can i traverse to the last subfolder in all the directories. eg: i have the below folders structure f1/sf1/r1 f2/sf2/r2 f3/sf3/r3/r4 i need to move to the last directory in each directory. Can anyone tell me a solution for this? I saw an example that does that. find . -type... (2 Replies)
Discussion started by: Little
2 Replies

9. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

10. UNIX for Dummies Questions & Answers

How to move gz files from one source directory to destination directory?

Hi All, Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder. using the find command . Could you please assist me how to put the automation using the shell script . ... (11 Replies)
Discussion started by: venkat918
11 Replies
DH_INSTALLLISTING(1)					User Contributed Perl Documentation				      DH_INSTALLLISTING(1)

NAME
dh_installlisting - install .listing files to be used by desktop-profiles package SYNOPSIS
dh_installlisting [debhelper options] [filename(s)] DESCRIPTION
dh_installlisting is a debhelper program that handles installing listing files used by the desktop-profiles package into the correct location in package builddirectories (NOTE: this command is provided by the desktop-profiles package, so don't forget to build-depends on it). It also updates the cache of profile assignments (when it exists) to reflect the added metadata. If a file named debian/package.listing exists (or debian/listing in case of the main package) it is installed in etc/desktop-profiles. In addition any files given as argument will be installed in etc/desktop-profiles as package_file.listing. The format of .listing files is described in desktop-profiles(7). A dependancy on desktop-profiles will be added to misc:Depends by using this script. SEE ALSO
debhelper(7) desktop-profiles(7) update-profile-cache(1) AUTHOR
Bart Cornelis (cobaco) <cobaco@skolelinux.no> perl v5.14.2 2006-12-13 DH_INSTALLLISTING(1)
All times are GMT -4. The time now is 01:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy