[Wien] Query regarding wien2k_scratch directory

Gavin Abo gabo13279 at gmail.com
Sun Apr 28 21:27:59 CEST 2024


The operating system /var log files I typically would not remove.  
Before attempting to remove any of them, I would ask the operating 
system experts if it would be safe to do so.  For Ubuntu for example, I 
think those experts would be over in the Ubuntu forums at [1].

The 15 GB is quite large such that I wouldn't expect the operating 
system with default logging to instantly cause that but get larger more 
gradually over time.

The du command [2] you might find helpful.  Below is an example.

First, I looked at the directories in the root folder for seeing which 
ones were using the most drive space:

username at computername:~$ sudo du --exclude=/proc --exclude=/run -csh /*
0    /bin
197M    /boot
4.0K    /cdrom
0    /dev
14M    /etc
2.6G    /home
0    /lib
0    /lib32
0    /lib64
0    /libx32
16K    /lost+found
44K    /media
4.0K    /mnt
4.0K    /opt
56K    /root
0    /sbin
3.7G    /snap
4.0K    /srv
2.1G    /swapfile
0    /sys
164K    /tmp
6.6G    /usr
3.2G    /var
19G    total

In my case, I'm storing my WIEN2k calculations under 
/home/username/wiendata and have my SCRATCH set to the case folders 
(with ./) that I put in that directory:

username at computername:~$ grep wiendata ~/.bashrc
alias cdw="cd /home/username/wiendata"
export W2WEB_CASE_BASEDIR=/home/username/wiendata
username at computername:~$ grep SCRATCH ~/.bashrc
export SCRATCH=./

I can check the space of just the /home directory with:

username at computername:~$ du -csh /home
2.6G    /home
2.6G    total

I see 2.6 GB of space is being used.

I check what I have under my home directory:

username at computername:~$ ls /home
username

There I see I only have one user account, which is named username.

I check how much space is being used by username:

username at computername:~$ du -csh /home/username
2.6G    /home/username
2.6G    total

Next, I check under /home/username to see what the 2.6 GB consists of:

username at computername:~$ cd /home/username/
username at computername:~$ du -csh * .[^.]*
4.0K    Desktop
4.0K    Documents
4.0K    Downloads
4.0K    Music
4.0K    Pictures
4.0K    Public
124M    snap
4.0K    Templates
4.0K    Videos
1.5G    WIEN2k
180M    wiendata
4.0K    .bash_history
4.0K    .bash_logout
4.0K    .bashrc
130M    .cache
176K    .config
12K    .gnupg
697M    .local
4.0K    .profile
4.0K    .ssh
0    .sudo_as_admin_successful
4.0K    .wget-hsts
2.6G    total

I see my WIEN2k installation is using 1.5 GB of the 2.6 GB used. My 
wiendata is currently only using 180 MB.

Looking in my wiendata folder, I currently only have one case 
calculation named Al:

username at computername:~$ ls /home/username/wiendata/
Al

I find it is taking the entire 180 MB:

username at computername:~$ du -csh /home/username/wiendata/*
180M    /home/username/wiendata/Al
180M    total

To display how much is used under the /home directory in MB, I use:

username at computername:~$ du -csh --block-size=M /home
2624M    /home
2624M    total

I want to move the Al directory from the computer to my USB connected 
external storage drive similar to what you described. First though, 
since my storage drive has a Windows NTFS partition, I have to rename 
the :log file to avoid a transfer error and I chose to name it log.txt:

username at computername:~$ mv /home/username/wiendata/Al/:log 
/home/username/wiendata/Al/log.txt

Creating an archive (.tar) or compressed file (.zip) of the Al directory 
would have been an alternate solution that would not have required 
renaming of the :log file.

I transferred the entire directory to my USB connected flash drive 
(mounted at /media/username/1A50-FE2F/Al) using a mv command in the bash 
terminal:

username at computername:~$ mv /home/username/wiendata/Al 
/media/username/1A50-FE2F/Al

I rechecked wiendata directory after that and see the Al file is gone 
(i.e., was transferred successfully):

username at computername:~$ ls /home/username/wiendata/

I check the space of /home again:

username at computername:~$ du -csh --block-size=M /home
2445M    /home
2445M    total

I see that the used /home space dropped 179 MB (= 2624M - 2445M).  The 1 
MB could be due to rounding error or other active processes going on the 
system taking it, but I was essentially able to get an entire 180 MB of 
free space back for this case as expected.

[1] https://ubuntuforums.org/
[2] 
https://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/

On 4/27/2024 11:23 AM, shamik chakrabarti wrote:
> Sir, also it is showing 139 Mb however my device space get decreased 
> by almost 15 GB
>
> On Sat, 27 Apr 2024 at 22:51, shamik chakrabarti 
> <shamik15041981 at gmail.com> wrote:
>
>     total 139M
>     4.0K drwxr-x--- 28 shamik shamik 4.0K Apr 26 23:48 .
>     ...
>     4.0K drwxrwxr-x  2 shamik shamik 4.0K Jun 26  2023 WIEN2k
>
>     On Sat, 27 Apr 2024 at 22:48, Peter Blaha
>     <peter.blaha at tuwien.ac.at> wrote:
>
>         ls -alsh
>
>
>         Am 27.04.2024 um 17:57 schrieb shamik chakrabarti:
>>         Dear Prof. Gavin,
>>
>>                         Yes, wien2k is installed under the /home
>>         directory. I have also checked /var. there are log files as
>>         mentioned in your reference [1]. In this regard, which files
>>         should I remove to recover the lost spaces?
>>
>>         with regards,
>>
>>         On Sat, 27 Apr 2024 at 17:42, Gavin Abo <gabo13279 at gmail.com>
>>         wrote:
>>
>>             If your WIEN2k cases are located somewhere under the
>>             /home directory, is this the directory you are seeing the
>>             space increase in?
>>
>>             If your looking at the space of the entire storage drive
>>             before and after the calculation, another possibility is
>>             the increase could be due to normal usage logging by the
>>             operating system.  So, if its the /var you are seeing
>>             increase after the calculation, it could potentially be
>>             due to that as log files could be stored there as seen
>>             for example at [1].
>>
>>             [1]
>>             https://ubuntu.com/tutorials/viewing-and-monitoring-log-files#2-log-files-locations
>>
>>             Kind Regards,
>>
>>             Gavin
>>             WIEN2k user
>>
>>             On 4/26/2024 10:52 PM, shamik chakrabarti wrote:
>>>             In that case, after deleting the case directory, the
>>>             space in hd of Linux should be recovered. But the space
>>>             is decreasing every time, I ran some calculations and
>>>             after copying delete the whole directory.
>>>
>>>             On Sat, 27 Apr 2024, 01:48 Tomas Kana, <kana at seznam.cz>
>>>             wrote:
>>>
>>>                 The dot and slash ./ means your current directory
>>>
>>>
>>>                 Dear Sir,
>>>
>>>                   After echo $SCRATCH the output is:   ./
>>>
>>>
>>>                 Any comments
>>>
>>>
>>>
>>>                 On Fri, 26 Apr 2024 at 22:14, Peter Blaha
>>>                 <peter.blaha at tuwien.ac.at> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>                     During   userconfig  you have specified a
>>>                 SCRATCH directory. Only
>>>                       you can know what you did there.
>>>
>>>                     PS:   echo $SCRATCH   will tell you, what you
>>>                 specified.
>>>
>>>
>>>
>>>
>>>
>>>                     Am 26.04.2024 um 13:30 schrieb shamik
>>>                       chakrabarti:
>>>
>>>
>>>
>>>
>>>
>>>
>>>                         Dear Wien2k users,
>>>
>>>
>>>
>>>
>>>
>>>                                              After running
>>>                 calculations I am saving
>>>                           the data in external hdd while deleting
>>>                 the same from linux.
>>>                           However, at each time, after deleting
>>>                 data, I have found that
>>>                           some amount of spaces are not recovered.
>>>                 Wien2k is saving some
>>>                           files in Linux which I am not able to delete.
>>>
>>>                         My query is where are those extra files are
>>>                 stored? Whether
>>>                           there is some directory called as _scratch
>>>                 but then I am not
>>>                           able to find it either?
>>>
>>>
>>>
>>>
>>>
>>>                         Any response is eagerly awaited.
>>>
>>>
>>>
>>>
>>>
>>>                         with regards,
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20240428/41dfa908/attachment.htm>


More information about the Wien mailing list