hello.
i need find folders only with name 2006 and delete.
find /path/to/dir/-07/ -type d | grep 2006 | -exec rm -rf {} \;
and etc doesnt work :\
what i do wrong :? (4 Replies)
I have some files in unix
ls -1
TMH.backend.tar.421E-03.Z
TMH.backend.tar.421E-04.Z
TMH.backend.tar.421E-05.Z
TMH.backend.tar.421E-06.Z
TMH.backend.tar.421E-07.Z
TMH.backend.tar.421E-08.Z
TMH.backend.tar.421E-08.Z.bak20081223164844
TMH.backend.tar.421E-09.Z... (1 Reply)
cmd="find /a/technologies -name '*.jar' | grep \"Tuning/specificloader/lib\""
echo $cmd
for index in `$cmd`
do
SL_JARS="${SL_JARS}:${index}"
done
gives error ==>
find: paths must precede expression
Usage: find
but
for index in... (2 Replies)
i am trying to find the files which are more than 100MB and it was created 10 days ago.
find /lola/loaded -size +102400 -mtime -10 -print | xargs ls -ltr
-rw-rw-r-- 1 lola_adm gdrmp 82054170 Jun 23 06:17 /lola/loaded/ILMEMBER20090622.txt
-rw-rw-r-- 1 lola_adm gdrmp 652080494 Jun 24... (3 Replies)
Hi guys -
I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good.
I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR.
MYSIZE=$(find /home/student/dir1... (8 Replies)
Hi There,
Can anybody help me out for searching this regular expression?
xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx
I would like the ID1 and ID2 (knowing which one is Id1 and id2)
.From-<ID1>.
and
.To-<ID2>.
Thanks in advance!!
Regards,
Bhaskar (4 Replies)
How to do alternation using regular expressions in the 'find' command? Like say you want to find all files that do not match the names specifically "this" or "that" within a directory using regular expressions? (10 Replies)
find ./ -name *Kconfig -exec cat {} \;
but it won't work with
find ./ -name *Kconfig -exec cat {} |grep CONFIG_MTD |grep depend \;
how could I handle this (14 Replies)
Hi!
I have a directory full of .plist type files from which I need to delete a line. Not every file contains the line, but of course I'd like to do it recursively. The line which I want to delete is:
<string>com.apple.PhotoBooth</string>
and looks like this in its native habitat:
... (9 Replies)
Have you tried running the command below? On the same RHEl 6.8 or 6.6. It will give you different output.
find . -maxdepth 1 -ctime -7 -type f
rpm -qa|grep find
findutils-4.4.2-9.el6.x86_64
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
# (6 Replies)
Discussion started by: invinzin21
6 Replies
LEARN ABOUT CENTOS
targetctl
targetctl(8) System Manager's Manual targetctl(8)NAME
targetctl - Save and restore configuration of kernel target
DESCRIPTION
targetctl is a low-level script to save and restore the configuration of the LIO kernel target, to and from a file in json format. It is
not normally meant to be used by end-users directly, but by system init frameworks, or advanced end-users who are generating the configura-
tion file themselves and need a way to load the configuration without relying on the targetcli configuration shell.
USAGE
targetctl must be invoked as root. Exit status will be 0 if successful, or nonzero if an error was encountered.
targetctl save [config-file]
Saves the current configuration of the kernel target to a file in json format. Since the file may contain cleartext passwords, the file's
permissions will be set to only allow root access. If config-file is not supplied, targetctl will use the default file location, /etc/tar-
get/saveconfig.json.
targetctl restore [config-file]
Removes any existing configuration and replaces it with the configuration described in the file. See saveconfig.json(5) for more details.
If parts of the configuration could not be restored, those parts will be noted in the error output, and the rest of the configuration will
still be applied.
targetctl clear
Removes any existing configuration from the running kernel target.
targetctl --help
Displays usage information.
SEE ALSO targetcli(8), targetd(8), saveconfig.json(5)FILES
/etc/target/saveconfig.json
/sys/kernel/config/target
AUTHOR
Written by Andy Grover <agrover@redhat.com>.
Man page written by Andy Grover <agrover@redhat.com>.
REPORTING BUGS
Report bugs via <targetcli-fb-devel@lists.fedorahosted.org>
or <https://github.com/agrover/rtslib-fb/issues>
targetctl(8)