LoginSignup
0
0

More than 5 years have passed since last update.

ファイルにパスを書いてfindコマンドにインプットする

Posted at

やりたいこと

テキストファイルにフルパスをいくつか書いてfindコマンドのインプットにする

ファイル階層

$ ls -lR /home/kusakari/test/
/home/kusakari/test/:
drwxrwxr-x 2 kusakari kusakari 18  4月 24 00:45 a
drwxrwxr-x 2 kusakari kusakari 18  4月 24 00:45 b
drwxrwxr-x 2 kusakari kusakari 18  4月 24 00:45 c

/home/kusakari/test/a:
-rw-rw-r-- 1 kusakari kusakari 0  4月 24 00:45 afile

/home/kusakari/test/b:
-rw-rw-r-- 1 kusakari kusakari 0  4月 24 00:45 bfile

/home/kusakari/test/c:
-rw-rw-r-- 1 kusakari kusakari 0  4月 24 00:45 cfile

入力ファイル

input
$ cat input 
/home/kusakari/test/a
/home/kusakari/test/c

コマンド

$ pwd
/
$ find `cat /home/kusakari/input` -type f -print
/home/kusakari/test/a/afile
/home/kusakari/test/c/cfile

以上です

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0