Skip to content
Advertisement

Tag: directory

Making new directories with a Bourne Shell script

I am am new to Linux and have a question about scripts. I am interested to know how you create a new directory and copy all the files (with .txt extension) from the existing directory into it? I am familiar with the mkdir method but I am having trouble when trying to execute it within a script. I have tried

The directory is being deleted too early

I’m trying to create a tar file from a directory’s contents using Codec.Archive.Tar, but I also want to clean up the directory once the tar file has been created. Here’s a small example which demonstrates my issue: When I call the function listFile e.g. from within ghci, I get back which I’m guessing is caused by the tar file being

Linux: Loop using foldername when finding file

I’m currently trying to use the following linux script to loop through folders and perform calculations using a function: The problem: How can I use the foldername to find the correct file? For example, the foldername is scan1 and I want to use the file called gaf_scan1_recording_mic.nii for the function. Thanks a lot, Eric Answer In most cases, $var and

Move all files at one level up one level

I had a problem with a backup on a linux server that somehow moved all folders of files down one level into a new folder with the same name. I would like to return all files to their original location. Many of the files have spaces in their names to complicate things. Original directory structure: Incorrect directory structure: Note that

error while running SOLR application

i am newbie on SOLR, i want to start my SOLR via terminal ubuntu but it always give error message : tail: cannot open ‘/var/solr/logs/solr.log’ for reading: No such file or directory i try to use this script service solr start and ./solr start but the result still same, any idea to fix this problem? Answer I fixed this increasing

Copy file only after all directories are copied

I have a folder A. It contains another folders data and opt, which contains many folders and files. And a complete.txt file, which denotes all files in data and opt are correct. I need to copy folder A completely. But the complete.txt file should copy only after all other files and folders are copied. Is there any linux command to

Advertisement