How do I delete all files and folders stored in /home/jerry/movies directories under Linux operating systems?
You need to the rm command.
Open a terminal or shell (bash) prompt and type the following command to delete everything in /home/jerry/movies
cd /home/jerry/movies pwd rm -rf *
OR you can use the following single command:
rm -rf /home/jerry/movies/
Please note that all folders and files including movies will be deleted. Once deleted you will not able to get back your data. So be careful when typing rm -rf command.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.
🐧 6 comments so far... add one ↓
🐧 6 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
~/.local/share/Trash/files# rm -rf *
Thanks for the tip about deleting all files from directory. This site always helps me for Linux tips. Thanks again !!
If i want to delete a directory containing files for which i dont have the access
can i delete those files too
If yes can you share me the command
rm -rfv nFolders/
Hi,
I am new to linux environment and using Centos 6.2 Version OS and found that some of the folder getting deleted automatically and the deleted files and folder are from recent access. How it is happening ? Do i need to change any basic settings after OS installed? Please support me to resolve this issue.
Hi
how do we delete files in a hidden directory on startup
What I am trying to accomplish here is in my system I have android sdk installed but it gives device unauthorized …. I found a solution which asks me kill the adb server using adb kill-server to delete all files in /home/user/.android which i do by cd /home/user/.android/ and rm -rf *
I wrote this in sequence up in /home/user/.profile file but except for adb kill-server nothing worked
I also tried rm -rf /home/user/.android/* too in the . profile file but again no result. I thought sudo might be missing but using it too no result.