What matters are how many entries are in a, not how much stuff there is in general.
for example, if /a contained these files:
the shell would try and turn /a/* into /a/f0000000 /a/f0000001 ... /a/f9999999 and run out of space in the commandline. Many systems will let you cram in a few hundred filenames, but not thousands or billions.
But a folder inside a is no problem since /a/* just becomes /a/foldername. It doesn't have to cram one million filenames into the list, and the rest becomes mv's job, which it'll do fine.
How big this limit is varies from system to system, but if it's not thousands, you're probably okay.
[edit] 50,000? Yeah, rmt's method works better. I just usually don't like it since, if /b doesn't exist, mv will rename /a into /b instead!
command and that worked fine. Now I wonder what is the command for decompress a .bzip2 file? I first .tar the file and then made it .bzip2 and will now upload it to the server and need to decompress. How?
Another short question: When I log in to the server from SSH I don't come to the root catalog. Is there any smarter/faster way the printing cd ../../../../ ?
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Hi All,
We have main directory called "head"
under this we have several sub directories and under these directories we have sub directories.
My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well.
And create... (14 Replies)
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)
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)
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)