Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to force emptying the Recycle Bin in ubuntu

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Ubuntu how to force emptying the Recycle Bin, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Mkdir directory name create a directory

Rmdir empty directory name delete an empty directory

Rm file name delete one or more files

Rm-rf non-empty directory name deletes everything under a non-empty directory

Touch filename create an empty file

Rename folder

Execution format: mv source destination

Example: mv file1 file2 changes the file file1 and changes the file name to file2. Mv file1 dir1 moves the file file1 to the directory dir1, and the file name is still file1. Mv dir1 dir2 if directory dir2 exists, move the directory dir1, and all its files and subdirectories, to the directory dir2, and the new directory name is dir1. If the directory dir2 does not exist, change dir1, and all its files and subdirectories, to the directory dir2.

The rename command is dedicated to file renaming, and as you can see from later examples, rename can rename files in batches as well as individual files. At the same time, it is worth noting that the rename command takes three parameters instead of two as many people think.

The above example shows the use of two kinds of file batch renaming, but in fact, rename in combination with wildcards is more powerful than the above example shows. The basic wildcards are as follows:

? Can replace a single character

* can replace multiple characters

[charset] can replace any single character in the charset set

The following is illustrated by examples:

If there are these files in the folder foo1,..., foo9, foo10,..., foo278, if you use the

Rename foo foo0 foo?

It will only rename foo1 to foo9 files to foo01 to foo09 because? Wildcards can only replace a single character, so the renamed file is only a file with a four-character name, and the foo in the file name is replaced with foo0.

And then continue to use

Rename foo foo0 foo??

Then all files from foo01 to foo99 in the folder are renamed foo001 to foo099, while foo100 and its subsequent file names remain the same because of the wildcard? , so only rename files with 5-character names, and the foo in the file name is replaced with foo0.

If you continue to use it

Rename foo foo0 foo*

Then all files from foo001 to foo278 are renamed foo0001 to foo0278, because the wildcard * replaces multiple characters, so all files that start with foo are renamed and the foo in the file name is replaced with foo0.

Let's look at the use of the wildcard [charset], or continue to execute the following command in the folder mentioned above.

Rename foo0 foo foo0 [2] *

All files from foo0200 to foo0278 are renamed foo200 to foo278, and the foo0 in the file name is replaced with foo.

In use, the three wildcards can be used together, and you can only constantly explore other specific uses.

Forced emptying of the Recycle Bin

Previous versions of ubuntu8.04

Sudo rm-fr $HOME/.Trash/*

Ubuntu 8.04

Sudo rm-fr $HOME/.local/share/Trash/files/*

Here is the usage of the touch command

-an only change the access time

-c,-- no-create does not create any files

-d,-- date= string is used to represent the time instead of the current time

-f (ignore)

-m only change the modification time

-r,-- the reference= file uses the specified time attribute instead of the current time

-t STAMP uses the [[CC] YY] MMDDhhmm [.ss] format instead of the current time

-- the time specified by time=WORD using WORD: access, atime, use are all equal to-a

The effect of the option, while the effect of the modify, mtime equal to-m option

-- help displays this help and leaves

-- version displays version information and leaves

Note that the-d and-t options accept different time / date formats.

After reading the above, have you mastered the method of how to force emptying the Recycle Bin in ubuntu? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report