Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Off-the-wall
Hi.
If you are looking for the space infrequently, then du seems like an appropriate solution, or perhaps allowing some tasks to run in parallel, say for the first-level sub-directories.
However, if you need to see the space more often, then there is a way that can you see it very quickly: make it a separate file system, and use df:
This was produced in:
and the results appeared almost instantaneously after the Return was pressed -- try it for yourself.
I have not done this in Solaris (it looks different on my Linux box), but I'm supposing that you'd allocate space on a disk, create a filesystem, create a directory in /, mount the filesystem, and copy the large directory to it, which would take time and disk space. After that, you could use the new directory as usual, and get your space calculations very fast.
It's not a trivial matter to do this, and it is drastic, but if you really, really needed it, then it may be a solution to consider. ... cheers, drl
There are some dependencies that you must also install. Dependencies: coreutils, libiconv, libintl, and to have /usr/local/lib/libgcc_s.so.1 install either the libgcc-3.4.6 or gcc-3.4.6 or later. You can find them at http://sunfreeware.com/
This is an alias that I have setup for doing a similar thing. It is about as fast as everything else previously listed, and has a clean output [since you seemed to want -h].
Hi
I am trying to run a script in a sub-directory, that has one space on it: such as:
/internaldisk1/Task Logs1, but my entry in cron is not working:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task\ logs1/./remov_reject.sh > /var/tmp/interd_`date '+%Y%M%d'`.log 2>&1 Please can... (4 Replies)
I have a script that I am trying to use. I need it to run from a certain directory. I have tried the following:
SCRIPT_DIR=$PWD
MYDIR="/filemount/files/Move Files"
cd "$MYDIR"
$SCRIPT_DIR/movefiles.bash
I have tried to run it. but I always get "no such file or directory" from the script... (5 Replies)
Hi,
I would like to list all files, older than 7 days, in a directory, but exclude all subdirectories in the find command. If I use find . -type f -mtime +7 all files in the subdirs are also included. How can I exclude them?
Regards,
JW (6 Replies)
Hello Comunity
I am trying to make a bash shell script that it copies files and subdirs(with files) to a new dir. I would like the dest_dir to contain only subdirectories with files not other subdirs inside.
it called : cpflatdir src_dir dest_dir
Pleaze help me!
Thank you in... (2 Replies)
Hi,
I have one dir which has N subdirs.For ex:
/home/user/Project_Src
/home/user/Project_Src/Dir_A
/home/user/Project_Src/Dir_A/subdir/sub_dir2
/home/user/Project_Src/Dir_A/subdir/sub_dir3
/home/user/Project_Src/Dir_B
/home/user/Project_Src/Dir_B/Build
i want to create a folder with... (2 Replies)
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Greetings!
I have multiple files, one per subdirectory, all with the same file name. All subdirectories are one level deep from the main directory.
The data in the files is tab delimited between fields and record delimited with a newline.
The subdirectory names have the date in the... (5 Replies)
OK I am trying to use something similar to this:
#!/bin/sh
echo "OK, starting now..."
sftp -b /dev/fd/0 user@remotehost <<EOF
cd pub
ascii
put filename.txt
bye
EOF
only difference is the dir I need to cd to has a space in it like this
/Import/Server/Prospect File
,... (3 Replies)
I am looking to delete files that are of a certain age with something like the following...
find /directory -type f -mtime +14 | xargs rm
....however, I would like to only execute this on the current directory and not subdirectories.
Any ideas? (4 Replies)
Hi everyone,
I need to write a script to calculate the space for sub-folders under /home:
Here is the scanrio:
cd /home
drwxr-xr-x 57 root root 8192 Jan 22 16:13 home_1
drwxrwxrwx 69 root root 8192 Jan 29 10:36 home_2
drwxr-xr-x 97 root root 8192 Nov... (8 Replies)