I have a single directory that contains dozens of directories inside of it.
I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique sub-directory.zip file.
So in the end my primary directory will be filled with all of my original sub-directories, plus the corresponding .zip files that contain the zipped up content of each sub-directory.
All
I have 2 parent directories - input and output. Each parent has multiple sub-directories...each sub-directory has multiple files.
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance.
Hi, I have a software install in a directory, says "/opt/tibco".
If I want to remove all the things in this directory and its sub-directories, but exclude all log files (*.log in different directories) and keep empty directories exist.
What should my command look like? I have no idea on how to keep those logs files in orginal directories. :confused::confused:
Thanks you!
Chance is that there will be empty files (zero byte files) and empty directories (that doesn’t contain any files) in your system. In this article, I will show you how to locate these empty directories and files and delete them.
The command you can use is the "find" command. To find empty directories in the current directory, you use the option -empty:
find .
Hello,
How can I delete all files called 001.txt in the working directory and its sub directories from the command line?
I am in /home/tom/test/ I have 40 directories and I want to remove all the files called 001.txt in all 40 directories
thanks
I have been trying to push the files in s3 to my ec2 instance.
When I do so :
sudo s3fs -o allow_other -o default_acl="public-read" files /home/logs
It doesn't give any error. But when I tried to look into the logs directory.
Recently I tried to move a directory that I own to another directory (which I also own), but I couldn't. I then noticed that I don't own the parent directory.
This made me wonder what are the rules for moving a directory in UNIX. Do you need to have read/write permissions to both it and its parent? Also what happens if it contains files or directories that you don't own?
I want to list all the files in a directory recursively. I am storing this output in a file that I will later iterate through and use each line as an argument in another command.
However all the commands I have tried have listed the directory name as one of the output lines followed by the files and directories contained in the directory.
I have tried the following:
tree -if --noreport .