I have a set of folders in some directory /home/dir, and I'd like to generate zip files for the contents of each folder separately. I'm wondering if there's a quick way to do this with a one-liner, or what the bash script would be.
Directory structure: /home/dir/first/second/thirdand I want three files, first.zip, second.zip, and third.zip. I know zip isn't the best format, but these are for distribution to users on Windows machines and I'd prefer to keep them in the zip format.
I want to do something like svn add dir1 dir2; svn ci dir1 dir2 but have it be only 1 revision. Is there a way to do this? Is this the correct way to add new folders (with contents) to the repository? We are restructuring the trunk, so I cleared it out and plan on putting these directories with their contents in it.
I have a USB drive that has a TON of folders on its root level. I want to remove all those folders and their contents except three of them. I know if I do rm -rf that will kill everything, is there a way to exclude three folders, say folder1 folder2 newfolder, and do it all in one statement?
I recently had to rescue files from a dying hard drive using Photorec. However, it dumped the files randomly in many different directories. Is there a way I can transfer the contents of these directories into one master directory without the file structure. For example, I have folders 1 through 10 as subdirectories in folder X. How can I transfer the contents of all those folders into folder Y while getting rid of the subdirectories 1 - 10?
Recently, Ubuntu was doing a standard update. It got stuck in some kind of strange loop. So i put the boot disk in cleared the master drive and reinstalled ububtu 10.4. I have a backup 500gb drive that use to keep the contents of my important information for my fileserver. After the completed install and found the backup drive STILL named "FILESERVER" and still has my folders aka: our pictures, our music, and our video. I opened them up and they're all empty. Am I missing some informaton? I swear i didn't format the drive. I couldn't have since the folders are still there. Where are all my files at?
I have a parent folder, with a lot of sub folders. basically, i'd like to bring all the contents from the sub folders into the parent folder, and subsequently delete the sub folders. is there one command for this? or do i need to cp -r over and over again, and then manually delete?
I've created a new group and a new user called dftp... Now I wanna do one thing... If 'dftp' connects thru ftp he should be directed to a particular location... and he shouldn't be able to see other folder except for his own including the parent folder that contains that location... I changed dftp's home folder to the location I want. However while connecting thru ftp. user dftp has been given permissions to see other folders and check out the contents of the other folders.
I want all files and folders and subfolders and images and everything inside of public_html. Also to be saved on the same folder so i can find it easy How can i do it?
Ive managed to install samba, I've shared a folder. I can access from a Windows 7 machine via \ubuntupublic. I can put files in the folder form the ubuntu machine and edit them on the windows box. I can put files in the folder/share from the Windows box but then I cannot edit them on the Ubuntu machine (they are read only and have a "Lock" over them). I can fix this by going to the properties of the file/folder in Windows and manually assigning "Everybody" full control (then the lock disappears and all is well.) I want read/write access to all the folders contents from both machines all the time (security is NOT a concern I WANT the permissions wide open) what am I doing wrong?
Being new to this area .I have been assigned a task which i am unable to do . Can any one please help me .
I have requirement where i have input file XYZ_111_999_YYYYMMDD_1.TXT and with header and series of Numbers and Footer.
I want to create a mutiple output files with each file having a seperate code which is stored in text file and create XYZ_222_999_YYYYMMDD_1.TXT . and add date in the contents next to series of numbers .Like this
Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,
Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.
$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.
Under /home/username/.mozilla I have a default folder which contains folders named "aqeif3n4.slt" and "cache". Under /home/username/.mozilla/Firefox I also have more default folders such as "6ajy4rl7.default", "ad2fpe1q.default" and "ivkrjhk8.default". I do not understand what the default folder under /home/username/.mozilla is for. I am sure that the .default folders under /home/username/.mozilla/Firefox are my Firefox files (duh!) but why are there more than one? Is a new one created every so often so you have copies from past time periods? Or what?
So I have a share hosting account with 60 sites all running wordpress.
There is a plugin I want to delete from all 60 wordpress sites.
The plugin is in the same path in all 60 sites.
mysite.com/wp-content/plugins/carter Is there a way I can search the entire home directory with filezilla or another ftp and delete every folder with that name in every site or I have to do it the tedious 1by1 sucky way?
i am using ps3mediaserver to expose my photos collection which is distributed across multiple sub-folders. unfortunately the ps3 can only show a slideshow for a single folder at a time, hence i was wondering if there was a quick way to create a single folder containing symbolic links to all my pictures.
I've got about twenty folders with names such as "Bennett Galleries" or "Athletic House" and I want to rename them to "Bennett_Galleries" or "Athletic_House". Any right utility to use to accomplish this (sed, awk, bash script, etc...)?
We have too many audio Paths, for each user have one. We would like to create a unique folder to Read in network.
For example:
The idea is Mapping all folders to the path /pub/Music in server, so all user can access all music online in the server.
Very Well. How we can do it?
And when pc1 and pc2 have the same subfolder, like Beatles, and in the subfolder have different folders ( PC1-Beatles/Revolver ) (PC2-Beatles/Habbey_Road) or The same folder (PC1-Beatles/The_Mistery_Magic_Tour) (PC3-Beatles/The_Mistery_Magic_Tour)...
In the out.zip i can see two directories (dir1 and dir2) but want only these two files (file1.txt and file2.txt) were in the root of out.zip! I thought the "-D" option is what I need, but it doesn't work
Let:Source directory is /x/y/z/src: Destination is /x/y/z/dst, Q: What is the option in zip command, which zip all updated or new picture files (*.jpg) from the source path to the destination + don't keep the original files -zipping while moving- ?
I am trying to use the command gzip to compress a directory or file list as argument and compress the file in a file named copia101225, within a directory named ZIPFILES. I want to make sure that if the arguments doesn't exist, the destination directory doesn't exist that it creates it. I keep failing at compressing the file to copia101225, that is within the directory named ZIPFILES This is what I have so far:
#! / bin / bash # Title: Compress a file # Author: Jose Miguel Colella # Description: Compress a file
I've been using fedora for quite some time now but I've never really written any bash scripts so I'm new to this. Basically what I'm trying to do is create symbolic links of movies that I have organized in this fashion:
Code: Movies/A Movies/B Movies/C etc.
I basically want to create an "ALL" folder that has links to all the movies in their designated folders. I have created somewhat of a bash script but it does not work.
Code: #!/bin/bash cd '/media/Videos/Movies' for file_name in `ls *` do ln -s "$file_name" All/$file_name done
I don't think its creating the right link to the movies and it is not taking into account the fact that some of the movies have spaces in their names.
I am attempting to copy a set of sub folders from their multiple parent directories to a new location.
For example, I have three folders to copy:
I would like them to be copied to:
In actuality there are many folders besides folder1, folder2, folder3, and no numerical order exists. So, the folder named 'photos' would be copied to its parent folder's name in a new location. I would need this to occur for all folders in the '/home/user' directory.
Is there a way to combine multiple folders into one "folder" similar to the way that Windows7 does Libraries? That way movies, for instance, would be able to be distributed on multiple drives, but appear in one place, when wanted. sort of like mounting multiple folders on on one mount point.
I am running Centos 5.5 with Apache 2.2.3, MySql 5, and PHP 5.1.6. I am migrating a Drupal installation to the default html folder for development purposes. I am very new to server management, and a bit lost.I want to install some other web sites on the sandbox server to experiment with before uploading them to a Production environment. Is it possible to have multiple html folders? Or to use symlinks to point to the folders where the other web sites will reside?
I have a shared NTFS partition ("shared") that I use for data for both Windows and Ubuntu. How can I mount the music folder on shared to $Home/Music, and the Videos folder on shared to $Home/Videos? I want to mount the different folders on the partition to different folders in home.
I am setting up a lubuntu nas with all of my music, movies, etc on it. I want to give my kids access to my mp3 directory, so I can move all of the kid appropiate music into the root of my mp3 dir, in the same order I have all of my music sorted. Under the Music folder, I have them sorted, in folders, by letter. So A, B, C, D, etc... Now, in those folders are the respective artists. So where there may be something approipate in the P folder (say, Paramore), there is something inapproipate (say, Pantera)Now, when the kids go to the P folder, I don't want them to even see the Pantera folder. I just want them to see the Paramore folder. I tried a test using chmod 711 and chmod 700 on a directory with a test user, and the user can't access the directory, but can still see it