Or find /decompressed-backup-dir -user tom I can find all the users files with the find command like this. ![]() This means there is no way to sync the users on the new machine to the ones on the old machine. For instance both machines had a MySQL user but they have different user ids and there are several user ids that existed on both machines that belong to different users. The problem is that the users on the machine the files are being restored to don't match the ones in the backup file. The files in the backup are from across the system and contain files from several different users and several system type accounts and it is key that when restored on the new server the settings are not lost. It was taken from a web server running Apache and MySQL. I have a backup file (.tgz) with user and group information preserved in it. My dream command would look something like this. You can place these files in the left or right panel using the Panelize option and copy/move/delete/view/do whatever you want with them.I'm looking for a Linux command that can change ownership of all files belonging to a given user, preferably in a targeted directory, to another specified user. It will find all files which match the criteria. To find files containing some specific text using Midnight Commander, start the app and press the following sequence on the keyboard:įill in the "File name:" section and press the Enter key. Unlike find or locate, mc is not included by default in all Linux distros I've tried. locate -i file_nameīonus tip: Another method I often use is Midnight Commander (mc), the console file manager app. In the general case, the syntax is as follows. While the search results appear instantly, you need to maintain the search index and keep it current, otherwise the locate command can find files which were deleted or moved to another directory. ![]() The index for the command can be created and updated by the updatedb command. The locate search tool uses a special file database to find files instantly. The "\ " ending specifies the end of the command for the -exec option. See the following example: find ~/Documents/winaero/ -iname opera45.txt -type f -exec vim " portion stands for files found by the find command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |