I wanted to organize the petit techniques of Linux basic commands within myself.
$ mv samplefile testfile
$ mv {sample,test}file
$touch file1 file2 file3 file4 ・ ・ ・
$ touch file{0..100}
Suppose you only have a samplefile in your current directory.
$ ls
samplefile
$ ls -l samplefile testfile > lsoutfile
ls: 'testfile'Cannot access:There is no such file or directory
$ ls -l samplefile testfile > lsoutfile 2>&1
or
$ ls -l samplefile testfile 2> lsoutfile 1>&2
$ ls -l samplefile testfile &> lsoutfile
$ touch samplefile`date +%Y%m%d` # ``Is back quotes
or
$ touch samplefile$(date +%Y%m%d)
I don't think I have the chance to use it so much, but I've summarized it because there are also such things. I'm glad if you can use it as a reference.
Recommended Posts