User Tools

Site Tools


unix:start

*nix

Files

FHS - The Unix File System Heirarchy recommendations.
Listing installed software

sed tutorial

See: Grymoire

Spells

How to search for a string in a selection of files (-exec grep …).

find . -exec grep “www.athabasca” '{}' \; -print
This command will search in the current directory and all sub directories. All files that contain the string will have their path printed to standard output.

Recursive Delete of .LCK files
find . -type f -name “*.LCK” -exec rm -f {} \;

Another Find text in files: find . -name “*.*” | xargs grep >text<

Compress a directory: tar -zcvf archive-name.tar.gz directory-name Where,
-z: Compress archive using gzip program
-c: Create archive
-v: Verbose i.e display progress while creating archive
-f: Archive File name
Soft Linkin
ln -s {/path/to/file-name} {link-name}
dos2unix Script file

#!/bin/csh

mv  -f  $1  $1.tmp
dos2unix  $1.tmp  $1

Find all symbolic links matching a regexp find . -maxdepth 1 -lname “*wab001*”

Count files
In an account: find . -type f |awk '!/^d/{print }' | wc -l
In a directory: ls -l | awk '!/^d/{print }' | wc -l

Count lines in a file
wc -l <fiename>

TAGS Tables
When you want to make a tags table from a great number of files, you may have problems listing them on the command line, because some systems have a limit on its length. The simplest way to circumvent this limit is to tell etags to read the file names from its standard input, by typing a dash in place of the file names, like this:

</code>
find . -name “*.[chCH]” -print | etags -
find . -name “*.el” -print | etags -l=lisp -
</code>

Move Backups out of the Active directory, retaining directory tree structure
find . -name “*.*BU*” | xargs -i bash -c “echo {} | cpio -pdmu ../BU/; rm -f {}”

Kubuntu

The Kubuntu 5.10 Quick Guide This is the first place t get started on the very basics of the KDE Environment.

KDE-apps.org This seems to be the place to go for finding applications and related plugins.

scp Usage scp <myfile> usr@server:path/filename taken from http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks I used it to transfer the following file Filesystem Hierarchy Standard -the standard locations for Linux files.

Boot Prompt - How to

Ubuntu VM

Mount the host drives sudo mount -t vboxsf H_DRIVE ~/h assuming you have first created the folder ~/h
To make it “permanent” sudo gedit /etc/init.d/rc.local and add the exact same mount command.

Exceed

Exceed is a Windows hosted X-term server which I recently discovered is available to University emplyees. It allows me to use, for example, emacs' speedbar on the sysa connection.
I considered setting up emacs for easy C/C++ programming, but then thought, “Why!?”
Decided instead set it up for the music and art scripting.
text based music/video editing?
Starting here: http://www.freebsd.org/doc/en/books/developers-handbook/emacs.html

Got X11 protocol working on my laptop with the following commands:

xhost +sunserver.cisl.columbia.edu
ssh -X armstrong@sunserver.cisl.columbia.edu

Thereafter for the rest of that session that console window will work in the X11 protocol

I found working in emacs in X11 is rather slow. It's a lot quicker just working with emacs on the server.
I will have to list what I want to get setup. Which in turn depends on what's available.

unix/start.txt · Last modified: 2020/04/08 00:24 (external edit)