All Questions
8
questions
0
votes
0
answers
368
views
Find and print permissions command in a csh file
Trying to create a .csh file that can find and display permission of the files in the directory.
Using the following content of the script
#!/bin/csh -b
find . type -f \( -name "*.sh" -o -name "*....
2
votes
1
answer
695
views
How to use if on csh FreeBSD from test if file is older then X minutes
I have the following code working in Debian system's:
for File in "${Files[@]}"; do
if test "`find $FolderDownload/$File -cmin -190`" ; then
echo "File is new then 3 hours"
# Set ...
1
vote
1
answer
382
views
Issues setting a variable to a string containing metacharacters, find, and another variable in csh
I'm using csh for a project (forced into it, sorry), and one component of my script uses variations of the following in a large block of its functionality:
find . -maxdepth 1 -not -type d | awk '{...
1
vote
1
answer
487
views
How to manipulate multiple file names using find?
How to improve the command below to change a string in a filename.
find . -type f -name '*<today>*' -exec mv {} {}_renamed \;
Actually I have a few files in my directory with today's date as a ...
4
votes
2
answers
2k
views
Find unique values from find
I want to find unique files inside a directory, which also have sub directories.
There are specific types of files, say .lib files.
There are same .lib file inside different sub directoris. I need ...
2
votes
2
answers
2k
views
How to create tar.gz of each file of a particular type in single command?
I need to compress and decompress each of the files of a particular type say *.html in their respective location.
For decompression, I used following command, it seemed to work for me:
find dir -...
3
votes
1
answer
3k
views
Odd alias "find . -name '*\!{*}*' -ls" in Unix Power Tools
From Unix Power Tools 3rd Edition page 175:
Article 9.27 shows a way to match directories in the middle of a path. Here's a simpler "find file" alias that can come in very handy:
alias ff &...
4
votes
4
answers
858
views
Text files containing their own name
I need to find in certain directory and all its' subdirectories all text files that contain their own name. How do I do this? (preferably without awk command)