Code: Select all
ls *mp3 > mp3.txt
Code: Select all
ls --color=never *mp3 > mp3.txt
Code: Select all
ls *mp3 > mp3.txt
Code: Select all
ls --color=never *mp3 > mp3.txt
Code: Select all
find | cut -c 3- | env -i egrep '\.(mpc|mp4|mp3|flac)$' > mp3.txt
Code: Select all
find | cut -c 3- | env -i egrep '\.(mpc|mp4|mp3|flac)$' > mp3.txt
Code: Select all
alias ls='ls -F --color=auto --group-directories-first'
Code: Select all
With --color=auto, ls emits color codes only when standard output is connected to a terminal.
Code: Select all
Runs COMMAND with ARGS suppressing shell function lookup, or display
information about the specified COMMANDs. Can be used to invoke commands
on disk when a function with the same name exists.
Code: Select all
busybox ls
Yes. If you look at "man busybox" you can see the large list of what is provided, and some tips for how to use the package instead of coreutils. You can either alias everything or use symbolic links from the commands to busybox. In fact, if you look at /bin/ash on your Debian system, you will probably see that it is a symlink to busybox.wuxmedia wrote: so, theoretically, perhaps not very practically, the busybox package could be used instead of coreutils?
Code: Select all
alias ls="ls -F --color --group-directories-first"
Code: Select all
alias ls="ls -F --color="auto" --group-directories-first"
Code: Select all
find ~/ -name "*~" -exec rm -i {} \;
Code: Select all
find ~/ -name ".*~" -exec rm -i {} \;
Code: Select all
sed -n 27p filename
Code: Select all
head -28 filename | tail -3
Code: Select all
grep -on "^static" file.c
Hmm... felt obliged to come to find's defence... how about:wuxmedia wrote:Yeah I couldn't get regex to play nice in find -shock!Code: Select all
find | cut -c 3- | env -i egrep '\.(mpc|mp4|mp3|flac)$' > mp3.txt
Code: Select all
find . -iregex '.*\.\(mpc\|mp4\|mp3\|flac\)$' -printf '%P\n' > mp3.txt