Unix commands (HOME DIR)
Note: All unix commands take the basic form:
command file (where “file” is the file to execute “command” upon)
Or more generically:
command argument1 argument2 [argument3]
ls lists current directory contents
ls -l long listing (owner, permissions, size, etc) – add “-h” for human readable sizes
ls -a list all, including those files that start with a dot (.).
pwd print working directory
mkdir [directory name] create a subdirectory
cd change working directory
– cd [directory name]
– cd .. moves up 1 directory level
– cd – toggles back to previous directory
cp copy a file
– cp [filename1] [filename2] (-R does recursive copy of all subdirectiries)
mv move (or rename) a file
– mv [filename1] [filename2]
less view a file one page at a time, advance pages with SPACE
less [filename] or less [filename]
rm remove (delete) a file (Note: there is no “undo”)
– rm [filename] (-r does recursive removal…useful, but be CAREFUL)
rmdir [directory name] note: the directory has to be empty
cat view the contents of a file (or better, “output” its contents), concatinate
> redirect output to a new file
cat [file1] [file2] > [newfile]
>> adds or “appends” to an existing file
cat [file1] [file2] [file3] >> temp_file
| Pipe, allows you to pass the results (stdout) of a command to another command
– ls | more
history shown a list of previously executed commands (-h for no command numbers)
!! run previous command in history (also “up-arrow”) number in history
!# run command from “history” where “#” is the command number
* wild card used to stand for “all”
– ls *.txt list all files with the extension .txt
Soundfile directory commands (SFDIR)
lsf lists current soundfile directory contents
lsf -l long listing (owner, permissions, size, etc)s
pwdsf print working directory
mkdirsf [directory name] create a subdirectory
cdsf change working directory
– cdsf [directory name]
– cdsf .. moves up 1 directory level (or “../../” for up two, etc)
– cdsf – toggles to previous directory (like “Back” in a browser)
cpsf copy a file
cpsf [filename1] [filename2] (-R does recursive copy of all subdirectiries)
mvsf move (and/or rename) a file
– mvsf [filename1] [filename2]
rmsf remove (erase) a file
– rmsf [filename] (-r does recursive removal…useful, but be CAREFUL)
rmdirsf [directory name] note: the directory has to be empty
play (p) play a soundfile or soundfiles in your current working directory
– p soundfile1.wav [soundfile-n.wav]
sfinfo view information about a soundfile in your current directory
– sfinfo soundfile1.wav [soundfile-n.wav]
playsflib(psfl) play a soundfile from the soundfile directories
– psfl fl.c4.wav
findsflib search the soundfile directory by character string
– findsflib character_string
findsflib -p search the soundfile directory by character string and play them as they are found
– findsflib -p character_string
CEMC specific commands (more to come)
lsex list available tutorial examples
getex obtain a copy of a tutorial example
– getex tutorial1 > mytutorial1
lstp list available templates (blank examples)
gettp obtain a copy of a template (blank examples)
cemchelp view available help files and read file designated by argument
cs shortcut to “csound”
– cs orc sout (compile files “orc” and “sout” with Csound
ssgdig shortcut for ssh access to “digital.music.cornell.edu”
ssgdev shortcut for ssh access to “devel.music.cornell.edu”