Sponsored Content
Top Forums Shell Programming and Scripting How to copy all structure folder create last day? Post 303026524 by fajar_3t3 on Thursday 29th of November 2018 12:49:53 AM
Old 11-29-2018
How to copy all structure folder create last day?

HI All,


please help , i got same case . i want copy folder and directory create yesterday.


for sample below :


Code:
drwxr-xr-x 4 apps apps    33 Nov 23 04:00 xxxxxx@gmai.com
drwxr-xr-x 4 apps apps    33 Nov 23 04:00 yyyyyyy@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 24 04:00 aaaaaa@yahoo.com
drwxr-xr-x 4 apps apps    33 Nov 24 04:00 bbbbbbb@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 24 04:00 ccccccccc@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 24 20:01 dddddd@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 24 20:03 eeeeeee@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 26 13:10 fff@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 26 13:10 gggggg@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 27 04:00 hhhhhh@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 28 04:00 iiiiiii@gmail.com
drwxr-xr-x 4 apps apps    33 Nov 29 04:00 jjjjj@gmail.com

pwd
Code:
/home/doc/user


and i want copy all folder directory create yesterday but actually in structure directory have some folder create different date like sample below :


pwd
Code:
/home/doc/user/jjjjj@gmail.com/doc



Code:
ls -ltr
total 0
drwxr-xr-x 2 apps apps 34 Oct 17 15:15 ID
drwxr-xr-x 2 apps apps 34 Oct 17 15:15 CARD

and i want copy all folder create yesterday include structure directory...


i already try with this command below but not spesified name folder got for yesterday create :

Code:
find /home/doc/user/ -mtime -1 -exec ls -ltr {} \;


please help , thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Auto copy for files from folder to folder upon instant writing

Hello all, I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written. I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies

2. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

3. Shell Programming and Scripting

Find all text files in folder and then copy to a new folder

Hi all, *I use Uwin and Cygwin emulator. I´m trying to search for all text files in the current folder (C/Files) and its sub folders using find -depth -name "*.txt" The above command worked for me, but now I would like to copy all found text files to a new folder (C/Files/Text) with ... (4 Replies)
Discussion started by: cgkmal
4 Replies

4. Shell Programming and Scripting

Concatenating Files In A Year/Month/Day File Structure

Hi Im trying to concatenate a specific file from each day in a year/month/day folder structure using Bash or equivalent. The file structure ends up like this: 2009/01/01/products 2009/01/02/products .... 2009/12/31/products The file I need is in products everyday and I need the script to... (3 Replies)
Discussion started by: Grizzly
3 Replies

5. Shell Programming and Scripting

Copy only folder structure ?

Hello, I am not sure how feasible is it, but trying to copy/create the folders from one box to another. I dont want to copy the content of folder otherwise it'd be too much of data.. The folder structure is quite complex (in deep hierarchy) and its a big effort manually .. Please... (5 Replies)
Discussion started by: navsha
5 Replies

6. Shell Programming and Scripting

Copy a file by creating folder structure in destination as in Souce

Hello, i am having a source directory which consist of multiple sub directories and my destination folder is a empty directory. if try to copy a file source->test->1.txt from source to destination test2 using the commaind. cp source/test/1.txt desti/ It will copy the 1.txt under desti... (1 Reply)
Discussion started by: tsaravanan
1 Replies

7. Shell Programming and Scripting

IMAPSYNC - trouble to create mailbox folder structure

Hi, I have installed ImapSync on Linux Debian. I tried run command to copy from Server A to Server B. It's run but imapsync doesn't create mailbox folder structure. I don't know if there is a command to force creation of mailbox's folders and subfolder. My command is below imapsync --host1... (0 Replies)
Discussion started by: symonx80
0 Replies

8. Shell Programming and Scripting

Move files & folder structure

Hey, this might be a really basic question, but I'm new to Unix scripting. I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure - home/temp/test/dir1/ ... (3 Replies)
Discussion started by: SOCLA_CELT
3 Replies

9. Shell Programming and Scripting

Getting the Folder Structure in Unix

Hi All, I have a compute box and I want to tar directory structure under a directory and then Deploy/untar it in a new compute box so that the directory structure will be exactly the same. I do not want any of the file to be extracted and deployed but instead only the directory structure. ... (2 Replies)
Discussion started by: filter
2 Replies

10. Shell Programming and Scripting

Script to create folder, copy file, and send email on success

I am very new to UNIX as well as scripting so please be gentle, haha. I have a Linux client which has a mount point mapped to my /etc folder on a NetApp FAS system. I woudl like to be able to copy the hosts and rc files once a week from the FAS to a different location for backup. When the... (4 Replies)
Discussion started by: minnino
4 Replies
ideviceinstaller(1)					      General Commands Manual					       ideviceinstaller(1)

NAME
ideviceinstaller - Manage iDevice apps SYNOPSIS
ideviceinstaller [OPTIONS] DESCRIPTION
Allows to install, upgrade, uninstall, archive, restore and enumerate installed or archived apps on iDevices. OPTIONS
General options: -d, --debug enable communication debugging. -U, --uuid UUID target specific device by its 40-digit device UUID. -h, --help prints usage information Commands: -l, --list-apps list apps installed on the device. Additional options: -o list_user list user apps only (apps installed by the user) This is the default. -o list_system list system apps only (apps available from the system firmware) -o list_all list all types of apps -o xml print output in xml format (PList) -i, --install ARCHIVE install app from a package file specified by ARCHIVE. -u, --uninstall APPID uninstall app specified by APPID. -g, --upgrade APPID upgrade app specified by APPID. -r, --restore APPID restore archived app specified by APPID. -L, --list-archives list archived applications on the device. Additional options: -o xml print output in xml format (PList) -a, --archive APPID archive app specified by APPID. Additional options: -o uninstall uninstall the package after making an archive -o app_only archive application data only -o copy=PATH copy the app archive to directory PATH when done -o remove only valid when copy=PATH is used: remove after copy -R, --remove-archive APPID remove app archive specified by APPID. AUTHOR
This manual page was written by Martin Szulecki. ideviceinstaller(1)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy