Use the dos2unix command to change Windows line endings to Unix line endings. To replace an existing file with a “fixed” file, type:
To create a new fixed version of the file, type:
dos2unix -n source_file.txt target_file.txt
Use the simple command/argument !$ (bang dollar) to reuse the last argument of your previous command, which is generally a filename. For instance, if you just ran the command:
you can run a different command, like vi, against the same file:
is the same as:
If you want to reuse all the previous arguments, use !* (bang star). Say you just ran:
touch file1 file2 file3
To reuse the arguments, command:
To run a processor-intensive command without grabbing all the resources of the server, simply put nice before your command:
nice find / -name *.txt
See the nice section for more details.
If you don’t have one in your home directory, create a public_html directory:
Now drop down into it:
Once you’re there, create a subdirectory:
chmod 755 sharedir
Put your files in it:
cp ~/sharedfile.txt sharedir
No file may be named index.htm[l] or default.asp.
Set their permissions:
chmod 644 sharedir/*
Give people the path to this directory. They will see a list of files, and can download them simply by clicking.
See Sharing files through the web by José R. Valverde at http://www.es.embnet.org/Doc/FAQ/www/.