I have a large directory of music files that is often changing as files and directories come and go.
Sorry, I know this must have been asked before but I couldn't find it...
Is there a command to remove all files and subdirectories in a directory WITHOUT deleting the directory?
For example if I have directory "dontDeleteMe" with subdirectories "1", "2", "3" and each subdirectory has a few pictures in it, how can I remove the subdirectories "1", "2", and "3" and all the files in the them, withou
Add a string to a text file from terminal
I've been looking at this thread. The solution (number 2, with ls | grep) works perfectly for files called .txt in the current directory.
If I redistribuite (using subdirectories) the files in a directory that is close to the Max Directory Size, can I workaround the problem?
It is not clear if the limitation is the total number files including the ones that are in subdirectories or only due to the number of files and subdirectories that a directory has.
I've been looking for a code snippet to place in a .sh that removes a directory named after a file.
What I mean by this is I would like to move to specify a directory and then search it for a list of files of type ".XXX" and then remove any subdirectories (with contents) with the same name.
Hi
I have to find size of subdirectory and automate it in CRON.
Eg: parent directory name is NVBKP inside it there are several subdirectories
I want to get the size of recent two subdirectories.
I have tried ls -ltr diretory path | tail -2
But it is providing only size of the folder not the contents of that folder.
For eg if there are 5 subdirectories in NVBKP say
a
b
c
d
e
then i need compl
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am able to list files only in the directory but not in sub-directories.
find . ! -name .
I am trying to move files from second level subdirectories into 1st level subdirectories. I.edirectoryA/directory1/directory-a/filesI would like to move the files from directory-a to directory1, and if possible delete directory-a after the files have been moved. The problem is I have hundreds of directories in directoryA, and then subfolders within the 1st level subdirectory.
I have a directory with a bunch of subdirectories in it. Thus
/usr/local/src/ccl/ccl-1.8/x86-headers$ ls
elf gl gmp gnome2 gtk2 jni libc
Each of these directories has a further subdirectory C inside it, which contains a file populate.sh.