Tag Info

Hot answers tagged

6

I did try this out on a live USB for answering a question on Quora some time ago (there's another great answer there by Eric Bowersox). First attempt on an installed system where I was confident nothing would happen: # cd / # rm -rf / rm: it is dangerous to operate recursively on `/' rm: use --no-preserve-root to override this failsafe # rm -rf . rm: ...


5

~ is a special shell replacement. It's replaced with your home directory (typically /home/$USER but not neccessarily). It's a shortcut we use because it's nice and short and it's impossible to know everybody's $HOME. Files and directories prepended with a dot are hidden. In Windows it's a boolean setting on files, in Unix it's based on the filename. You can ...


3

So I did it in a running Ubuntu 14.10 VM inside Virtualbox. I did not bother to install it myself but downloaded one directly from osboxes.org Running sudo rm -rf --no-preserve-root / in a terminal caused this: Some buttons began to disappear in the launcher Then the launcher was gone And finally all the desktop with the terminal running disappeared Left ...


3

To answer your ~/bin related question, by default Ubuntu does not come with ~/bin directory, if you want you can create it : mkdir ~/bin Note that this is $HOME/bin i.e. if your username is foobar then ~/bin or $HOME/bin expands to /home/foobar/bin. This directory is normally used for saving user specific binary files. There is also a /bin directory, ...


2

I would use inotify API provided by the kernel to monitor filesystem events. There is no need for an indefinite while loop, you can use a tool that uses the interface provided by the kernel to check for any changes on any file. One of the tools that uses inotify is inotifywait. From man inotifywait : inotifywait efficiently waits for changes to files using ...


2

You could assign a group ownership to a parent folder and then make inside files inherit properties. Assigning group ownership could be set by sudo chmod -R 660 myself:somegroup /path/to/parent The group ownership can be inherited by new files and folders created in your folder /path/to/parent by setting the setgid bit using chmod g+s like this: chmod ...


1

DO NOT EVER DO THIS, but if you did sudo rm -rf / the rm command, running as root, would happily start deleting. If it found a file, it would delete it,. If rm found a directory, it would enter the directory, delete all the files, then delete the directory. Eventually, rm will run out of files to delete, or will delete a file rm needs (like a dynamic ...


1

There is a way to open video files on SMB network using "nautilus" of gnome/Unity. After install nautilus, run KDE->type "nautilus" and Run nautilus. (Or make shortcut for nautilus.) There are some merits for using nautilus, first merit is it can be played just double click video files on two or more SMB network what has different user / password. No need ...


1

My backup sets currently contain /var (except /var/run, /var/cache, /var/tmp) /srv /etc /root /home /usr (/usr/local only, nothing else) Note this is for a server, so backing up things like /etc saves all my configuration for my services, I have web servers in /srv (though if you have them in /var/www, they would still be in this backup set), I have ...


1

Don't move anything. Just use links. For example, say your normal user is usera and your second one is userb. Presumably, userb is a brand new account and doesn't have any data you want to keep. So, delete the directories in question and recreate them as links, then set up the right permissions: Delete the directoriess and recreate as links sudo rmdir ...


1

Try this: #!/bin/bash for d in */; do touch $d/$d.md done


1

First, create the file, using the editor of your choice. Store it in a user directory, something in or under $HOME Check it to be sure it says what you think it says, and does what you want. Then, and only then: sudo cp yourfile /etc/X11/xorg.conf.d/50-mouse-acceleration.conf


1

The reason is quite clear. You did not set mounting rules for this disk in /etc/fstab/. When system starts, the disk is not mounted. Just add a line to /etc/fstab for a permanent rule and the problem will be solved. This is a guide.


1

From man chmod: SETUID AND SETGID BITS chmod clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one of the user's supplementary group IDs, unless the user has appropriate privileges. Additional restrictions may cause the set-user-ID and set-group-ID bits ...


1

I think you have to change the umask to 0002 : umask 0002



Only top voted, non community-wiki answers of a minimum length are eligible