Size of Folders [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to delete all empty folders in a folder without having to open all of them. Unfortunately the size is not displayed next to the folder name. I already tried to adjust it under "options" but it is still not working.
Would anyone know how to do display the size?
Thank you!

You might try using tree function: on my PC I have created three subfolders and only one of them contains a file. The result of the tree command looks as follows:
C:\Temp_Folder>tree /F /A
Folder PATH listing
Volume serial number is 261B-B97E
C:.
| Ga_van_A_naar_B_in_de_VS.png
| landen
|
+---tralala
| test.txt
|
+---tralalala
\---tralalalala
As you see, when the next directory comes directly on the next line, this means your directory is empty (you need /F to see the files inside the directories for verifying they're empty or not).

Related

Total size of all file types in a folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Is there any way/too in window7 to see the total size of files of particular type ? For example if I have directory which has 5 files. 2 files are Jpg, 1 is log file and 2 are docx file. In such case, it should report something like below
jpg - 2 files- Total size -10 MB
log file - 1 file- Total size -5KM
document file - 2 file - Total -45 MB
-Rajesh
Is there a way to do this in linux (e.g. some form of ls or grep)? If there is, it is probably supported by cygwin.
In other words, you could install cygwin and then run something like the 'find' command shown here: https://askubuntu.com/questions/558979/how-to-display-disk-usage-by-file-type.
Also, if you put the cygwin executable directory in your PATH environment you can run all of the cywin commands from a windows command prompt.
And if you just want a good way to see where all of your disk space is being used there are a number of good tools for that. I personally like spacesniffer.
You can start a command window and use dir.
ex:
dir *.txt

How to find and delete 15 days older files with Cron Jobs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I want to delete the files, which are older than 15 days. Files directory is
/home/app_admin/files
There is 100+ folder in the 'files' directory, I only want to delete the files, which are older than 15 days without deleting the folders.
In the 'files' directory, there are many folders like below ↓↓↓
16 Jwellary Image Clipping
300 photos to be retouched
Ashraf Amin
Background removal
Background removal and retouching
Brad C
Change wording in a Photoshop file
Color Correct 123 Product Photos
cut out some high res photos
I want to delete the files from this folders.
Can anyone please help me to figure out this.
Check first what would be deleted:
find path/to/basedir -mtime +15 -type f
If the output looks good, then add -delete:
find path/to/basedir -mtime +15 -type f -delete

Linux mint terminal output disappearing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm running a script on terminal and it is supposed to produce a long output, but for some reason the terminal is just showing me the end of the result and I cannot scroll up to see the complete result. Is there a way to save all the terminal instructions and results until I type clear.
The script I'm using has a loop so I need to add the output of the loop if Ill be redirecting the output to a file.
Depending on your system, the size of the terminal buffer may be fixed and hence you may not be able to scroll far enough to see the full output.
A good alternative would be to output your program/script to a text file using:
user#terminal # ./nameofprogram > text_file.txt
Otherwise you will have to find a way to increase the number of lines. In some terminal applications you can go to edit>profiles>edit>scrolling tab and adjust your settings.
You can either redirect the output of your script in a file:
script > file
(Be careful to choose a file that does not exist otherwise the content will be erased)
Or you can buffer the output with less:
script | less

Shell show same files in the same path? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I got two output folders when I type ls -l on shell.
MyBookLive:~/download/# ls -l
drwxrwxrw- 4 root root 65536 2013-12-20 12:33 output
drwxrwxrw- 3 root root 65536 2013-12-20 12:33 output
And I am sure there is no spaces in filename, because when I hit tab key, it shows:
MyBookLive:~/download/# ls -l output
output/ output/
Why? Thanks.
The second "output" has character 129 after the last "t".
Try this in your browser's console, copying the "output/ output/" string from your question.
"output/ output/".split('').forEach(function(x){console.log(x, x.charCodeAt(0))})

Log file pattern matching [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
i want to monitor application log file for specific error patterns on content added in since last 10 min (or since script last run) please not i dont want to monitor entire log file but only lines that are added in last 10 min, when patern is matched i want it displayed on screen. I'm confused how to achieve this thru script.
TIA
regards
tnt5273
FILE=logfile
lines=$(wc -l < "$FILE")
while sleep 600; do
clines=$(wc -l < "$FILE")
diff=$(($clines - $lines))
tail -$diff $FILE | grep PATTERN
lines=$clines
done
What you appear to be describing is commonly achieved at a console by:
tail -F /path/to/my/file | grep "pattern"
This an idiom used by many system adminstrators.
There's another approach where you want to be alerted if a particular event is logged, but you don't want to watch for it.
The Simple Event Correllator is a perl script designed to watch logs, correlate events and perform actions.

Resources