Finding largest files takes too long

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Finding largest files takes too long
# 8  
Old 06-12-2018
This is the output of 3 subdirectores of Filesysyem /SCEL/logs1

Code:
SCEL /SCEL/logs1 #ls -ld xpbatch  
drwxrwsrwx   3 oracle   explotacion 86179840 Jun 12 09:47 xpbatch
SCEL /SCEL/logs1 #ls -ld xpfactur
drwxrwxrwx   9 oracle   explotacion 1327104 Jun 12 09:45 xpfactur
SCEL /SCEL/logs1 #ls -ld xpconpag
drwxrwxrwx   2 xpconpag explotacion 2596864 Jun 12 09:00 xpconpag
SCEL /SCEL/logs1 #

I appreciate your help once again in advanced

---------- Post updated at 10:16 AM ---------- Previous update was at 09:53 AM ----------

Thank you all of yout for your support:


This is the output of 3 subfolders for Filesystem /SCEL/logs1

Code:
SCEL /SCEL/logs1 #ls -ld xpbatch  
drwxrwsrwx   3 oracle   explotacion 86179840 Jun 12 09:47 xpbatch
SCEL /SCEL/logs1 #ls -ld xpfactur
drwxrwxrwx   9 oracle   explotacion 1327104 Jun 12 09:45 xpfactur
SCEL /SCEL/logs1 #ls -ld xpconpag
drwxrwxrwx   2 xpconpag explotacion 2596864 Jun 12 09:00 xpconpag

---------- Post updated at 07:33 PM ---------- Previous update was at 10:16 AM ----------

This is what I posted, thanks again for your help

Code:
SCEL /SCEL/logs1 #ls -ld xpbatch  
drwxrwsrwx   3 oracle   explotacion 86179840 Jun 12 09:47 xpbatch
SCEL /SCEL/logs1 #ls -ld xpfactur
drwxrwxrwx   9 oracle   explotacion 1327104 Jun 12 09:45 xpfactur
SCEL /SCEL/logs1 #ls -ld xpconpag
drwxrwxrwx   2 xpconpag explotacion 2596864 Jun 12 09:00 xpconpag


Last edited by rbatte1; 06-13-2018 at 07:13 AM.. Reason: Spelling
# 9  
Old 06-13-2018
Can you sign on to the server at address 10.80.1.83 ? If you can, running your code there will be significantly faster that running over the network. This will be not just the searching, but the actual compression too. If you compress over the network, then you have to read the file across the network to your local memory, compress it and then write the resultant file back across the network to the server disk.

It really could be a massive difference in performance.


Robin
# 10  
Old 06-13-2018
If your bottleneck is the many fork()s then it helps to replace
Code:
-exec ls -ld {} \;

with
Code:
-exec ls -ld {} +

The + bundles the arguments and forks/execs few ls with the maximum number of arguments.
This User Gave Thanks to MadeInGermany For This Post:
# 11  
Old 06-15-2018
Thanks again all of you for your help. It was useful for me
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script takes too long to complete

Hi, I have a lengthy script which i have trimmed down for a test case as below. more run.sh #!/bin/bash paths="allpath.txt" while IFS= read -r loc do echo "Working on $loc" startdir=$loc find "$startdir" -type f \( ! -name "*.log*" ! -name "*.class*" \) -print | while read file do... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. Shell Programming and Scripting

Find command takes long

Hi, I am trying to search for a Directory called "mont" under a directory path "/opt/app/var/dumps" Although "mont" is in the very parent directory called "dumps" i.e "/opt/app/var/dumps/mont" and it can never be inside any Sub-Directory of "dumps"; my below find command which also checks... (5 Replies)
Discussion started by: mohtashims
5 Replies

3. UNIX for Advanced & Expert Users

Find command takes too long to complete

Hi, Below is my find command find /opt/app/websphere -name myfolder -perm -600 | wc -l At time it even takes 20 mins to complete. my OS is : SunOS mypc 5.10 Generic_150400-09 sun4v sparc SUNW,T5440 (10 Replies)
Discussion started by: mohtashims
10 Replies

4. UNIX and Linux Applications

database takes long time to process

Hi, we currently having a issue where when we send jobs to the server for the application lawson, it is taking a very long time to complete. here are the last few lines of the database log. 2012-09-18-10.35.55.707279-240 E244403536A576 LEVEL: Warning PID : 950492 ... (1 Reply)
Discussion started by: techy1
1 Replies

5. Shell Programming and Scripting

sort takes a long time

Dear experts I have a 200MG text file in this format: text \tab number I try to sort using options -fd and it takes very long! is that normal or I can speed it up in some ways? I dont want to split the file since this one is already splitted. I use this command: sort -fd file >... (12 Replies)
Discussion started by: voolek
12 Replies

6. UNIX for Dummies Questions & Answers

time how long it takes to load a module

Hello, like the title says, how can i measure the time it takes to load a module in Linux, and how how can i measure the time it takes to load a statically compiled module. /Best Regards Olle ---------- Post updated at 01:13 PM ---------- Previous update was at 11:54 AM ---------- For... (0 Replies)
Discussion started by: ollebanan
0 Replies

7. Linux

it takes long time to login on server

Hi, I am trying to login using ssh on Red Hat Linux 5 server, The password appears immediately but after I enter the password it takes about 90 seconds to login completely. Please suggest what changes require? Regards, Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies

8. UNIX for Dummies Questions & Answers

finding largest files (not directories)?

hello all. i would like to be able to find the names of all files on a remote machine using ssh. i only want the names of files, not directories so far i'm stuck at "du -a | sort -n" also, is it possible to write them to a file on my machine? i know how to write it to a file on that... (2 Replies)
Discussion started by: user19190989
2 Replies

9. Shell Programming and Scripting

Killing a process that takes too long

Hello, I have a C program that takes anywhere from 5 to 100 arguments and I'd like to run it from a script that makes sure it doesnt take too long to execute. If the C program takes more than 5 seconds to execute, i would like the shell script to kill it and return a short message to the user. ... (3 Replies)
Discussion started by: WeezelDs
3 Replies

10. UNIX for Dummies Questions & Answers

Finding out how long a command takes to run

Hi I am trying to find out the best way to find out how long a command takes to run in miliseconds .. Is there such a way of doing this in Unix ? Thanks (3 Replies)
Discussion started by: cfoxwell
3 Replies
Login or Register to Ask a Question