find: missing argument to `-exec' in Ubuntu Server 18.4 [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I was helped with a command, but it doesn't seem to be working. This is the command:
find /var/www/HernandezW/wordpress/ -type d -exec chmod 750 {}\;
The shell return error messages:
find: missing argument to `-exec'
How can I fix it to be able to install WordPress?

Try adding space after {}:
find /var/www/HernandezW/wordpress/ -type d -exec chmod 750 {} \;

Related

How to change folders/files emblems recursively in linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want to change my folder emblems recursively. I know that the command gvfs-set-attribute -t string ~/Desktop/ metadata::emblems [] can change the emblem of only Desktop.
How can I change whole folders and the files emblems? I tried gvfs-set-attribute -t stringv ~/* metadata::emblems [] but it returns error Error setting attribute: Setting attribute /home/taygun/Desktop not supported.
You could feed the command into find:
find ~/ -type d -exec gvfs-set-attribute -t stringv {} metadata::emblems [] \;
There are some known issues with the defaultdir ~ on some distros with gvfs-set-attribute (https://bugzilla.redhat.com/show_bug.cgi?id=1368676)
Consider upgrading to the latest version if you're not already on it.

Remove symbolic links only from a folder in tcsh [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I need to remove a large number of symbolic links from a folder that has other files which I don't want to remove. Is there any easy way to remove only symbolic links?
You can use the find(1) command
find . -maxdepth 1 -type l -exec rm {} \;
-maxdepth 1 is for only scanning current directory.
-type l is for searching symbolic links
-exec executes rm to delete given file, the {} being replaced by find with an appropriate path, and the \; ending the sub-command run by find
See also the man page of rm(1) (and of ls(1), mv(1), cp(1), ln(1), stat(1) if you want to use them in a variant of that find command).

Linux : Rename files that ends with live.conf to dev.conf [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have list of files which ends with -live.conf.
e.g.
admin-live.conf
user-live.conf
Above files should be renamed to:
admin-dev.conf
user-dev.conf
please help me how can I achieve with single command.
this is rename stand-alone utility by perl package.
usage :-
rename -n -v 's/live.conf/dev.conf/' *
Proper find + bash solution:
find . -type f -name "*-live.conf" -exec bash -c \
'dir_n=${0%/*}/; fn=${0##*/}; mv "$0" "$dir_n${fn/-live/-dev}"; ' {} \;

how to find file and size in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have to do this task on linux
find recursively only files in /etc that are larger than 200kb and redirect stdout to a file named FLfindout and redirect stderr to a file named FLfinderr
and I typed in
find /etc 200k > FLfindout 2> FLstderr
and I don't know what the output suppose to be look like. and is this command right?
If I understand your question right you just want to get the list of files greater than 200Kb, you can try
find /etc -type f -size +200
if you want this print into a file, you could try
find /etc -type f -size +200 > file.txt
Try this:
find /etc -type f -size +200k -print > FLfindout 2> FLstderr

How to delete all files expect specific file type in the folder using command line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have lot of files in specific folder.
I want to delete all files expect *.html file type in that folder.
Is there any way to do this in command line? I am using Linux.
I'll assume that you refer to linux command line, please update your question if not.
find ./folder/to/look/in -not -iname '*.html' -exec rm {} \;
Here's an explanation of what this does
edit
If you have not too many files then you might want to make find execute one single rm command. You can do that with using + instead of ;
find ./folder/to/look/in -not -iname '*.html' -exec rm {} +
Here's an explanation of this one

Resources