Tag Archives: folder

Bad pen notes: solution to leaving blank folder on launchpad after Adobe product is uninstalled by MacOS

This article source: http://blog.csdn.net/chaijunkun/article/details/104272409, reproduced please indicate. As I am not regular will sort out the relevant blog, the corresponding content will be improved. It is therefore highly recommended to view this article in its original source.
First of all, it is stated that this solution has been translated from an answer on the official website of Adobe community, but no reliable answer has been found in Baidu. For those students who have encountered the same problem, please refer to the translation here. The original address: https://community.adobe.com/t5/get-started/adobe-application-manager-in-launchpad/td-p/8857148?page=1
When upgrading Adobe products in macOS, I used to delete all the historical versions of relevant apps and then install them completely to avoid all kinds of inexplicable problems. However, after uninstalling, there will always be one left behind in Launchpad called Adobe Application Manager (Other) in some cases. If you’re using a Chinese system, it might be: Adobe Application Manager (other). I have deleted all the apps, but I can’t delete this folder. The original answer was:

This answer 100% worked for me!
Take a random app
Make it wobble (as if if deleting it)
Drag and drop into folder you’re trying to delete
Then click into folder you just drop the app into
Remove the app from the folder
Folder will automatically delete

In fact, don’t bother, randomly select an application installed in the system, long press, make the app icon become shaking, move it to the folder in question, release. Then try to remove the app, and the empty folder will automatically be deleted.
Attachment: Adobe products in the macOS complete deletion method:
https://helpx.adobe.com/x-productkb/global/delete-previously-installed-application-files.html
In a nutshell, focus on the following sections:
/Applications: all Adobe software under the directory
and all adobe-related files (including plist files) and folders under the directory below:
/Users/[User]/Library/Preferences
/Users/[User]/Library/Application Support
/Library/Application Support
/Library/Preferences

/Applications/Utilities
may also have Adobe related files, which are recommended to be cleaned together when completely deleted.

Linux view folder size, remaining disk space (DU / DF)

1. Introduction

du for directory size, df for disk usage.

2. du

disk usage
(1) basic function
recursively view the sizes of all files under the folder
(2) common parameters:
-h, — human-readable for size (for example: 1K 234M 2G)
-s, — summarize each parameter in the command column calculated the total amount of
(3) other parameters:
-a, — all output the disk amount of all files, not just the directory
— summary size display surface amount, but not the disk amount; Although the surface usage is usually smaller, it can sometimes become larger due to “holes” between sparse files, internal fragments, blocks that are not directly referenced, and so on.
-b, — block-size=
-b, — bytes = — br>-size =1
-c, — total display total information
-d, The filename ending in NUL in the calculated file F corresponds to the space on the disk. If the value of F is “-“, then the filename read from the standard input
-h is equal to — dereference-args (-d)
-h. The — human-readable sizes are displayed in a readable manner (for example, 1K 234M 2G)
— si similar to -h, but using 1000 as the basis for the calculation instead of 1024
-k is equal to — block-size=1K
-l, — count-links if hard connected, Calculate its size
-m is equal to — block-size=1M
-l, — dereference finds the true destination indicated by any symbolic link
-p, — no-dereference does not follow any symbolic link (default)
-0, — null regards each blank line as 0 bytes instead of a newline
-s, — separate dirs does not include subdirectory occupancy
-s,
-x;
-x;
-x;
-x;
-x;
-x;
-x;
-x;
— exclude=PATTERN files that match the PATTERN described in the specified file
— exclude=PATTERN files that match the PATTERN described in the specified file
— max-depth=N display directory total (used with -all calculation files)
calculates depth N when N is the specified value;
— max-depth=0 equals — summarize
— time summarize
— time=WORD display WORD time, not change time: atime, access, use, ctime or status
— time-style= style display time according to the specified style (same as the “date” command) : FORMAT
full-iso, long-iso, iso, +FORMAT
— help display this help information and exit
— version display version information and exit

3. df

df-hl view disk remaining space
df-h view the partition size of each root path
du-sh [directory name] return the size of the directory
du-sm [folder] return the total number of M of the folder

4. The difference between

du is a file-oriented command that only calculates the space occupied by the file, not the space occupied by the file system metadata.
df is calculated based on the overall file system, and the size of the allocated space in the system is determined by the unallocated space in the file system. The DF command can get how much space is taken up by the hard disk and how much space is left, and it can also show how all file systems are using I nodes and disk blocks.

Python traverses all files under the specified path and retrieves them according to the time interval

demand

It is required to find the word documents in a certain date range in the folder, and list the names and paths of all words, such as all word documents under the D drive from July 5 to July 31.

Modify file type

Insert picture description here

Modify file path

Insert picture description here

Retrieve file modification time interval

Insert picture description here

 

#conding=utf8
import os
import time
g = os.walk(r"C:\Users\Administrator\Downloads")
def judge_time_file(path, file, update_time):
    if not file.endswith(('.doc','.docx')):
        return False
    start_time = time.mktime(time.strptime('2020-04-12 00:00:00', "%Y-%m-%d %H:%M:%S"))
    end_time   = time.mktime(time.strptime('2020-05-23 00:00:00', "%Y-%m-%d %H:%M:%S"))
    # print(start_time ,  update_time , end_time)
    if start_time < update_time < end_time:
        return True
    return True
 
data_list = []
i = 0
 
for path, dir_list, file_list in g:
 
    for file_name in file_list:
        local_time = os.stat(os.path.join(path, file_name)).st_mtime
        if judge_time_file(path, file_name, local_time):
            data_list.append([os.path.join(path, file_name), time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(local_time))])
            # print(data_list)
        i=i+1
        print(i)
data_list.sort(key=lambd