Move file to new directory unix




















The highest rated answer contains this note, and suggests using -type f. Did you mean this instead to mean that the subfolders do get moved but the contents of them remain in the subfolders instead of getting moved out of them or? BTW, I would have had this as just a comment to the highest rated answer, which was a good answer, but I don't have the reputation.

Pradeep Kanoor Pradeep Kanoor 11 1 1 bronze badge. Why should he use rm? Your command deletes both the log files and possibly the destination directory. Ops, my mistake, I think mYzk want to remove this files. Edited — cuonglm. Sign up or log in Sign up using Google. Sign up using Facebook.

Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.

It would also be save to double-quote the variables, just in case there are some special characters in the name. Show 3 more comments. Linux Tech Linux Tech 1 1 1 bronze badge. Thank you all for your sincere cooperation. Guy Guy 1 1 gold badge 6 6 silver badges 18 18 bronze badges.

Please use IFS which determines field separator. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.

Move files from Space Folder to other folder. I want to move a folder with spaces from one folder to another. I have two folders like this, 1. Here I want to assign this like a user defined variable like as Source branch Move files to another folder base on DU.

But need to keep the latest 5 files. After that delete from the original. How to proceed? Please help Gav Move only files to a folder. I want to move all the files inside a directory to another directory which is inside that directory. Please help. Note: I want to move only the files. Note the folders.

Thanks in advance. Move all files but not folders to a new folder. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.



0コメント

  • 1000 / 1000