Trying to remove a folder from the terminal and rmdir says directory not empty. I want the folder and everything in it gone. What's the right command, and is there a safe way to double check before I run it?
Questions tagged #linux
Want to clear everything inside a logs folder, including hidden files, but keep the folder because a service writes into it. rm -rf folder/* misses the dot files. What's the clean way to do it?
Copied a project folder from an external drive on Ubuntu and now I can't edit anything inside it, everything says permission denied. ls -l shows root as the owner. What's the right chown / chmod to make it mine without breaking things?
Inherited an old box at work and need to know the distro and release before installing anything. uname -r only gives me the kernel number. Is there a command that shows the actual distro name and version?
I'm on a headless server over ssh and need to reboot it. What's the right command, and is there a difference between shutdown -r and reboot?
Tried zip with the folder name and it only made an empty archive. Need the full directory with all files inside, and the right command to unzip it again on another machine.
rmdir says the directory isn't empty. I know rm -rf is the answer people give, but it scares me a bit. What's the safe way to remove a folder with all its contents without nuking the wrong thing?
On Ubuntu su asks for a root password that I never set. I've seen people use sudo -i or sudo su instead. What's the right way to get a root shell, and is it a bad habit to work as root?
Ubuntu warned me about low disk space. Which command shows free space for each drive in a readable way rather than giant numbers?
Just installed Ubuntu and I'm trying to do things in the terminal instead of the file manager. How do I create a new folder, then an empty text file inside it? And can I make a few folders in one command?